linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] Btrfs: do not resize a seeding device
@ 2012-05-21  2:28 Liu Bo
  2012-05-21  2:28 ` [PATCH 2/2 v2] Btrfs: resize all devices when we dont assign a specific device id Liu Bo
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Bo @ 2012-05-21  2:28 UTC (permalink / raw)
  To: linux-btrfs

Seeding devices are not supposed to change any more.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
v1->v2: use EINVAL instead, suggested by David Sterba

 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 f056469..ec2245d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1303,6 +1303,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 %s\n", device->name);
+		ret = -EINVAL;
+		goto out_free;
+	}
+
 	if (!strcmp(sizestr, "max"))
 		new_size = device->bdev->bd_inode->i_size;
 	else {
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-21  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21  2:28 [PATCH 1/2 v2] Btrfs: do not resize a seeding device Liu Bo
2012-05-21  2:28 ` [PATCH 2/2 v2] Btrfs: resize all devices when we dont assign a specific device id Liu Bo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).