From: Marcos Paulo de Souza <mpdesouza@suse.de>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: define support masks for ioctl volume args v2
Date: Fri, 21 Feb 2020 10:20:42 -0300 [thread overview]
Message-ID: <e1a17a295fdf2fd1269e8234e2b7348727b10a8a.camel@suse.de> (raw)
In-Reply-To: <c25c2e84ebc5ef31227ae23d44e09ddc8c343a7b.1582289899.git.dsterba@suse.com>
On Fri, 2020-02-21 at 14:02 +0100, David Sterba wrote:
> The ioctl data for devices or subvolumes can be passed via
> btrfs_ioctl_vol_args or btrfs_ioctl_vol_args_v2. The latter is more
> versatile and needs some caution as some of the flags make sense only
> for some ioctls.
>
> As we're going to extend the flags, define support masks for each
> ioctl
> class separately.
>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> include/uapi/linux/btrfs.h | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> index 7a8bc8b920f5..49ed71df5e94 100644
> --- a/include/uapi/linux/btrfs.h
> +++ b/include/uapi/linux/btrfs.h
> @@ -97,16 +97,26 @@ struct btrfs_ioctl_qgroup_limit_args {
> };
>
> /*
> - * flags for subvolumes
> + * Arguments for specification of subvolumes or devices, supporting
> by-name or
> + * by-id and flags
> *
> - * Used by:
> - * struct btrfs_ioctl_vol_args_v2.flags
> + * The set of supported flags depends on the ioctl
> *
> * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following
> ioctls:
> * - BTRFS_IOC_SUBVOL_GETFLAGS
> * - BTRFS_IOC_SUBVOL_SETFLAGS
> */
>
> +/* Supported flags for BTRFS_IOC_RM_DEV_V2 */
> +#define BTRFS_DEVICE_REMOVE_ARGS_MASK
> \
> + (BTRFS_DEVICE_SPEC_BY_ID)
> +
> +/* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and
> BTRFS_IOC_SUBVOL_CREATE_V2 */
> +#define BTRFS_SUBVOL_CREATE_ARGS_MASK
> \
> + (BTRFS_SUBVOL_CREATE_ASYNC |
> \
> + BTRFS_SUBVOL_RDONLY |
> \
> + BTRFS_SUBVOL_QGROUP_INHERIT)
> +
> struct btrfs_ioctl_vol_args_v2 {
> __s64 fd;
> __u64 transid;
Looks good to me,
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
next prev parent reply other threads:[~2020-02-21 13:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 13:02 [PATCH 0/3] Clean up supported flags for ioctls David Sterba
2020-02-21 13:02 ` [PATCH 1/3] btrfs: define support masks for ioctl volume args v2 David Sterba
2020-02-21 13:20 ` Marcos Paulo de Souza [this message]
2020-02-21 13:02 ` [PATCH 2/3] btrfs: use ioctl args support mask for subvolume create/delete David Sterba
2020-02-21 13:21 ` Marcos Paulo de Souza
2020-02-21 13:02 ` [PATCH 3/3] btrfs: use ioctl args support mask for device delete David Sterba
2020-02-21 13:22 ` Marcos Paulo de Souza
2020-02-21 13:24 ` [PATCH 0/3] Clean up supported flags for ioctls Nikolay Borisov
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=e1a17a295fdf2fd1269e8234e2b7348727b10a8a.camel@suse.de \
--to=mpdesouza@suse.de \
--cc=dsterba@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox