Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs: add preferred_metadata mode mount option
When this mode is enabled, the chunk allocation policy is modified giving a different precedence between the disks depending by the chunk type. A disk may be marked with the preferred_metadata flag to have higher chance to host metadata. There are 4 modes: - preferred_metadata=disabled The allocator is the standard one. - preferred_metadata=soft The metadata chunk are allocated on the disks marked with the "preferred_metadata" flag. The data chunk are allocated on the disks not marked with the "preferred_metadata" flag. If the space isn't enough, then it is possible to use the other kind of disks. - preferred_metadata=hard The metadata chunk are allocated on the disks marked with the "preferred_metadata" flag. The data chunk are allocated on the disks not marked with the "preferred_metadata" flag. If the space isn't enough, then "no space left" error is raised. It is not possible to use the other kind of disks. - preferred_metadata=metadata The metadata chunk are allocated on the disks marked with the "preferred_metadata" flag. For metadata, if the space isn't enough, then it is possible to use the other kind of disks. The data chunk are allocated on the disks not marked with the "preferred_metadata" flag. For data, if the space isn't enough, then "no space left" error is raised. It is not possible to use the other kind of disks. To mark a disk as "preferred_metadata", use the command # btrfs properties set <disk> preferred_metadata 1 To remove the flag "preferred_metadata" from a disk, use the command # btrfs properties set <disk> preferred_metadata 0 Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
- Loading branch information