aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorLiu Bo <liubo2009@cn.fujitsu.com>2012-06-14 04:23:19 -0400
committerChris Mason <chris.mason@fusionio.com>2012-06-15 11:42:26 -0400
commit4e42ae1bdcda77fc958a17d7ff4ba5a9c9c207da (patch)
tree4e699d6744df1509c730ab8d4b8ff714d347d5e1 /fs/btrfs/ioctl.c
parentbc1782374b128103ae9689e0753e0610f35b6bfd (diff)
Btrfs: do not resize a seeding device
Seeding devices are not supposed to change any more. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a98f7d252829..58adbd0356d6 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1306,6 +1306,13 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root,
1306 ret = -EINVAL; 1306 ret = -EINVAL;
1307 goto out_free; 1307 goto out_free;
1308 } 1308 }
1309 if (device->fs_devices && device->fs_devices->seeding) {
1310 printk(KERN_INFO "btrfs: resizer unable to apply on "
1311 "seeding device %llu\n", devid);
1312 ret = -EINVAL;
1313 goto out_free;
1314 }
1315
1309 if (!strcmp(sizestr, "max")) 1316 if (!strcmp(sizestr, "max"))
1310 new_size = device->bdev->bd_inode->i_size; 1317 new_size = device->bdev->bd_inode->i_size;
1311 else { 1318 else {