diff options
author | Liu Bo <liubo2009@cn.fujitsu.com> | 2012-06-14 10:23:19 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-06-15 17:42:26 +0200 |
commit | 4e42ae1bdcda77fc958a17d7ff4ba5a9c9c207da (patch) | |
tree | 4e699d6744df1509c730ab8d4b8ff714d347d5e1 /fs/btrfs/ioctl.c | |
parent | Btrfs: fix missing inherited flag in rename (diff) | |
download | linux-4e42ae1bdcda77fc958a17d7ff4ba5a9c9c207da.tar.xz linux-4e42ae1bdcda77fc958a17d7ff4ba5a9c9c207da.zip |
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 '')
-rw-r--r-- | fs/btrfs/ioctl.c | 7 |
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, ret = -EINVAL; goto out_free; } + if (device->fs_devices && device->fs_devices->seeding) { + printk(KERN_INFO "btrfs: resizer unable to apply on " + "seeding device %llu\n", devid); + ret = -EINVAL; + goto out_free; + } + if (!strcmp(sizestr, "max")) new_size = device->bdev->bd_inode->i_size; else { |