diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2011-02-15 18:14:25 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-02-16 15:37:59 -0500 |
commit | 9b3517e9136824346227b7b04f8f7ea1f3a726cc (patch) | |
tree | b317f5ed612c5adae478a7acd48f6d8096a1656d /lib/ctype.c | |
parent | ca9b688c1c9a21635cfc8af8b68565b154185196 (diff) |
Btrfs: make btrfs_rm_device() fail gracefully
If shrinking done as part of the online device removal fails add that
device back to the allocation list and increment the rw_devices counter.
This fixes two bugs:
1) we could have a perfectly good device out of alloc list for no good
reason;
2) in the btrfs consisting of two devices, failure in btrfs_rm_device()
could lead to a situation where it was impossible to remove any of the
devices because of the "unable to remove the only writeable device"
error.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'lib/ctype.c')
0 files changed, 0 insertions, 0 deletions