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

Seeding devices are not supposed to change any more.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
 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 = -EACCES;
+		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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 12:08 [PATCH 1/2] Btrfs: do not resize a seeding device Liu Bo
2012-05-17 12:08 ` [PATCH 2/2] Btrfs: resize all devices when we dont assign a specific device id Liu Bo
2012-05-23  5:21   ` Goffredo Baroncelli
2012-05-24  2:15     ` Liu Bo
2012-05-24 20:17       ` Goffredo Baroncelli
2012-05-18 13:01 ` [PATCH 1/2] Btrfs: do not resize a seeding device David Sterba
2012-05-21  2:17   ` 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).