diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-12-13 15:06:46 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-12-13 20:07:01 -0500 |
commit | 83a50de97fe96aca82389e061862ed760ece2283 (patch) | |
tree | 95421594f180c32cca1ff7f6881f4cf272cf2b5c /include/linux/trdevice.h | |
parent | cd02dca56442e1504fd6bc5b96f7f1870162b266 (diff) |
Btrfs: prevent RAID level downgrades when space is low
The extent allocator has code that allows us to fill
allocations from any available block group, even if it doesn't
match the raid level we've requested.
This was put in because adding a new drive to a filesystem
made with the default mkfs options actually upgrades the metadata from
single spindle dup to full RAID1.
But, the code also allows us to allocate from a raid0 chunk when we
really want a raid1 or raid10 chunk. This can cause big trouble because
mkfs creates a small (4MB) raid0 chunk for data and metadata which then
goes unused for raid1/raid10 installs.
The allocator will happily wander in and allocate from that chunk when
things get tight, which is not correct.
The fix here is to make sure that we provide duplication when the
caller has asked for it. It does all the dups to be any raid level,
which preserves the dup->raid1 upgrade abilities.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'include/linux/trdevice.h')
0 files changed, 0 insertions, 0 deletions