Skip to content

Commit 83288b6

Browse files
jeffmahoneykdave
authored andcommitted
btrfs: uapi/linux/btrfs.h migration, qgroup limit flags
The BTRFS_QGROUP_LIMIT_* flags are required to tell the kernel which fields are valid when using the BTRFS_IOC_QGROUP_LIMIT ioctl. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent d4ae133 commit 83288b6

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

‎fs/btrfs/ctree.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,14 +1154,6 @@ struct btrfs_qgroup_info_item {
11541154
__le64 excl_cmpr;
11551155
} __attribute__ ((__packed__));
11561156

1157-
/* flags definition for qgroup limits */
1158-
#define BTRFS_QGROUP_LIMIT_MAX_RFER (1ULL << 0)
1159-
#define BTRFS_QGROUP_LIMIT_MAX_EXCL (1ULL << 1)
1160-
#define BTRFS_QGROUP_LIMIT_RSV_RFER (1ULL << 2)
1161-
#define BTRFS_QGROUP_LIMIT_RSV_EXCL (1ULL << 3)
1162-
#define BTRFS_QGROUP_LIMIT_RFER_CMPR (1ULL << 4)
1163-
#define BTRFS_QGROUP_LIMIT_EXCL_CMPR (1ULL << 5)
1164-
11651157
struct btrfs_qgroup_limit_item {
11661158
/*
11671159
* only updated when any of the other values change

‎include/uapi/linux/btrfs.h‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ struct btrfs_ioctl_vol_args {
4141
#define BTRFS_UUID_SIZE 16
4242
#define BTRFS_UUID_UNPARSED_SIZE 37
4343

44-
#define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0)
44+
/*
45+
* flags definition for qgroup limits
46+
*
47+
* Used by:
48+
* struct btrfs_qgroup_limit.flags
49+
* struct btrfs_qgroup_limit_item.flags
50+
*/
51+
#define BTRFS_QGROUP_LIMIT_MAX_RFER (1ULL << 0)
52+
#define BTRFS_QGROUP_LIMIT_MAX_EXCL (1ULL << 1)
53+
#define BTRFS_QGROUP_LIMIT_RSV_RFER (1ULL << 2)
54+
#define BTRFS_QGROUP_LIMIT_RSV_EXCL (1ULL << 3)
55+
#define BTRFS_QGROUP_LIMIT_RFER_CMPR (1ULL << 4)
56+
#define BTRFS_QGROUP_LIMIT_EXCL_CMPR (1ULL << 5)
4557

4658
struct btrfs_qgroup_limit {
4759
__u64 flags;
@@ -51,6 +63,14 @@ struct btrfs_qgroup_limit {
5163
__u64 rsv_excl;
5264
};
5365

66+
/*
67+
* flags definition for qgroup inheritance
68+
*
69+
* Used by:
70+
* struct btrfs_qgroup_inherit.flags
71+
*/
72+
#define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0)
73+
5474
struct btrfs_qgroup_inherit {
5575
__u64 flags;
5676
__u64 num_qgroups;

0 commit comments

Comments
 (0)