summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2013-08-27 06:50:44 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:16:38 -0400
commit795a33213973cf0195198132162862fb05929425 (patch)
treeb32a10de047e619ee26b5f9de91cb4343af1c789 /fs/btrfs
parentd8f980391f418e567c805d3e40be5d63bfc4c8ea (diff)
Btrfs: stop refusing the relocation of chunk 0
AFAICT chunk 0 is no longer special, and so it should be restriped just like every other chunk. One reason for this change is us refusing the relocation can lead to filesystems that can only be mounted ro, and never rw -- see the bugzilla [1] for details. The other reason is that device removal code is already doing this: it will happily relocate chunk 0 is part of shrinking the device. [1] https://bugzilla.kernel.org/show_bug.cgi?id=60594 Reported-by: Xavier Bassery <xavier@bartica.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f42e41290124..603cce85764f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2997,10 +2997,6 @@ again:
2997 if (found_key.objectid != key.objectid) 2997 if (found_key.objectid != key.objectid)
2998 break; 2998 break;
2999 2999
3000 /* chunk zero is special */
3001 if (found_key.offset == 0)
3002 break;
3003
3004 chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk); 3000 chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
3005 3001
3006 if (!counting) { 3002 if (!counting) {
@@ -3036,6 +3032,8 @@ again:
3036 spin_unlock(&fs_info->balance_lock); 3032 spin_unlock(&fs_info->balance_lock);
3037 } 3033 }
3038loop: 3034loop:
3035 if (found_key.offset == 0)
3036 break;
3039 key.offset = found_key.offset - 1; 3037 key.offset = found_key.offset - 1;
3040 } 3038 }
3041 3039