From: Liu Bo <liubo2009@cn.fujitsu.com>
To: David Sterba <dave@jikos.cz>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] Btrfs: do not resize a seeding device
Date: Mon, 21 May 2012 10:17:57 +0800 [thread overview]
Message-ID: <4FB9A5D5.7040805@cn.fujitsu.com> (raw)
In-Reply-To: <20120518130123.GJ24394@twin.jikos.cz>
On 05/18/2012 09:01 PM, David Sterba wrote:
> On Thu, May 17, 2012 at 08:08:08PM +0800, Liu Bo wrote:
>> --- 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).
>
That's true, I'll follow your advice.
CAP_SYS_ADMIN has already been there. :)
And thanks for reviewing this.
thanks,
liubo
>
> david
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2012-05-21 2:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB9A5D5.7040805@cn.fujitsu.com \
--to=liubo2009@cn.fujitsu.com \
--cc=dave@jikos.cz \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.