[3/8] btrfs: uapi/linux/btrfs.h migration, document subvol flags
diff mbox

Message ID 1459541670-4097-4-git-send-email-jeffm@suse.com
State New
Headers show

Commit Message

Jeff Mahoney April 1, 2016, 8:14 p.m. UTC
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 include/uapi/linux/btrfs.h | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

Comments

Liu Bo April 27, 2016, 8:27 p.m. UTC | #1
On Fri, Apr 01, 2016 at 04:14:25PM -0400, Jeff Mahoney wrote:
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Looks good to me.

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

Thanks,

-liubo

> ---
>  include/uapi/linux/btrfs.h | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> index 9651af3..0316e23 100644
> --- a/include/uapi/linux/btrfs.h
> +++ b/include/uapi/linux/btrfs.h
> @@ -34,9 +34,6 @@ struct btrfs_ioctl_vol_args {
>  
>  #define BTRFS_DEVICE_PATH_NAME_MAX 1024
>  
> -#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
> -#define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
> -#define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
>  #define BTRFS_FSID_SIZE 16
>  #define BTRFS_UUID_SIZE 16
>  #define BTRFS_UUID_UNPARSED_SIZE	37
> @@ -85,6 +82,20 @@ struct btrfs_ioctl_qgroup_limit_args {
>  	struct btrfs_qgroup_limit lim;
>  };
>  
> +/*
> + * flags for subvolumes
> + *
> + * Used by:
> + * struct btrfs_ioctl_vol_args_v2.flags
> + *
> + * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:
> + * - BTRFS_IOC_SUBVOL_GETFLAGS
> + * - BTRFS_IOC_SUBVOL_SETFLAGS
> + */
> +#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
> +#define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
> +#define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
> +
>  #define BTRFS_SUBVOL_NAME_MAX 4039
>  struct btrfs_ioctl_vol_args_v2 {
>  	__s64 fd;
> -- 
> 2.7.1
> 
> --
> 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
--
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

Patch
diff mbox

diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 9651af3..0316e23 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -34,9 +34,6 @@  struct btrfs_ioctl_vol_args {
 
 #define BTRFS_DEVICE_PATH_NAME_MAX 1024
 
-#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
-#define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
-#define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
 #define BTRFS_FSID_SIZE 16
 #define BTRFS_UUID_SIZE 16
 #define BTRFS_UUID_UNPARSED_SIZE	37
@@ -85,6 +82,20 @@  struct btrfs_ioctl_qgroup_limit_args {
 	struct btrfs_qgroup_limit lim;
 };
 
+/*
+ * flags for subvolumes
+ *
+ * Used by:
+ * struct btrfs_ioctl_vol_args_v2.flags
+ *
+ * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:
+ * - BTRFS_IOC_SUBVOL_GETFLAGS
+ * - BTRFS_IOC_SUBVOL_SETFLAGS
+ */
+#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
+#define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
+#define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
+
 #define BTRFS_SUBVOL_NAME_MAX 4039
 struct btrfs_ioctl_vol_args_v2 {
 	__s64 fd;