Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e42ae1b authored by Liu Bo's avatar Liu Bo Committed by Chris Mason
Browse files

Btrfs: do not resize a seeding device



Seeding devices are not supposed to change any more.

Signed-off-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent bc178237
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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 {