Thread (7 messages) 7 messages, 4 authors, 2012-05-24

Re: [PATCH 1/2] Btrfs: do not resize a seeding device

From: David Sterba <hidden>
Date: 2012-05-18 13:01:32

On Thu, May 17, 2012 at 08:08:08PM +0800, Liu Bo wrote:
quoted hunk ↗ jump to hunk
--- 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;
I think EINVAL would be more appropriate. EACCESS is about permissions
which do not make much sense in context of resizing devices, besides
that CAP_SYS_ADMIN is required anyway (and checked a few lines above).


david
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help