Skip to content

Commit

Permalink
Btrfs: do not resize a seeding device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Bo authored and Chris Mason committed Jun 15, 2012
1 parent bc17823 commit 4e42ae1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4e42ae1

Please sign in to comment.