From: Liu Bo Date: Thu, 14 Jun 2012 08:23:19 +0000 (-0600) Subject: Btrfs: do not resize a seeding device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e42ae1bdcda77fc958a17d7ff4ba5a9c9c207da;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Btrfs: do not resize a seeding device Seeding devices are not supposed to change any more. Signed-off-by: Liu Bo Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a98f7d25282..58adbd0356d 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 {