All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Btrfs Development List <linux-btrfs@vger.kernel.org>
Cc: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH 2/8] btrfs: uapi/linux/btrfs.h migration, qgroup limit flags
Date: Fri,  1 Apr 2016 16:14:24 -0400	[thread overview]
Message-ID: <1459541670-4097-3-git-send-email-jeffm@suse.com> (raw)
In-Reply-To: <1459541670-4097-1-git-send-email-jeffm@suse.com>

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>
---
 fs/btrfs/ctree.h           |  8 --------
 include/uapi/linux/btrfs.h | 22 +++++++++++++++++++++-
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3beaa24..c228b39 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1154,14 +1154,6 @@ struct btrfs_qgroup_info_item {
 	__le64 excl_cmpr;
 } __attribute__ ((__packed__));
 
-/* flags definition for qgroup limits */
-#define BTRFS_QGROUP_LIMIT_MAX_RFER	(1ULL << 0)
-#define BTRFS_QGROUP_LIMIT_MAX_EXCL	(1ULL << 1)
-#define BTRFS_QGROUP_LIMIT_RSV_RFER	(1ULL << 2)
-#define BTRFS_QGROUP_LIMIT_RSV_EXCL	(1ULL << 3)
-#define BTRFS_QGROUP_LIMIT_RFER_CMPR	(1ULL << 4)
-#define BTRFS_QGROUP_LIMIT_EXCL_CMPR	(1ULL << 5)
-
 struct btrfs_qgroup_limit_item {
 	/*
 	 * only updated when any of the other values change
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 11eee34..9651af3 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -41,7 +41,19 @@ struct btrfs_ioctl_vol_args {
 #define BTRFS_UUID_SIZE 16
 #define BTRFS_UUID_UNPARSED_SIZE	37
 
-#define BTRFS_QGROUP_INHERIT_SET_LIMITS	(1ULL << 0)
+/*
+ * flags definition for qgroup limits
+ *
+ * Used by:
+ * struct btrfs_qgroup_limit.flags
+ * struct btrfs_qgroup_limit_item.flags
+ */
+#define BTRFS_QGROUP_LIMIT_MAX_RFER	(1ULL << 0)
+#define BTRFS_QGROUP_LIMIT_MAX_EXCL	(1ULL << 1)
+#define BTRFS_QGROUP_LIMIT_RSV_RFER	(1ULL << 2)
+#define BTRFS_QGROUP_LIMIT_RSV_EXCL	(1ULL << 3)
+#define BTRFS_QGROUP_LIMIT_RFER_CMPR	(1ULL << 4)
+#define BTRFS_QGROUP_LIMIT_EXCL_CMPR	(1ULL << 5)
 
 struct btrfs_qgroup_limit {
 	__u64	flags;
@@ -51,6 +63,14 @@ struct btrfs_qgroup_limit {
 	__u64	rsv_excl;
 };
 
+/*
+ * flags definition for qgroup inheritance
+ *
+ * Used by:
+ * struct btrfs_qgroup_inherit.flags
+ */
+#define BTRFS_QGROUP_INHERIT_SET_LIMITS	(1ULL << 0)
+
 struct btrfs_qgroup_inherit {
 	__u64	flags;
 	__u64	num_qgroups;
-- 
2.7.1


  parent reply	other threads:[~2016-04-01 20:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 20:14 [PATCH 0/8] btrfs: uapi migration for user-visible API components Jeff Mahoney
2016-04-01 20:14 ` [PATCH 1/8] btrfs: uapi/linux/btrfs.h migration, move BTRFS_LABEL_SIZE Jeff Mahoney
2016-04-27 19:23   ` Liu Bo
2016-04-01 20:14 ` Jeff Mahoney [this message]
2016-04-27 19:24   ` [PATCH 2/8] btrfs: uapi/linux/btrfs.h migration, qgroup limit flags Liu Bo
2016-04-01 20:14 ` [PATCH 3/8] btrfs: uapi/linux/btrfs.h migration, document subvol flags Jeff Mahoney
2016-04-27 20:27   ` Liu Bo
2016-04-01 20:14 ` [PATCH 4/8] btrfs: uapi/linux/btrfs.h migration, move feature flags Jeff Mahoney
2016-04-27 21:08   ` Liu Bo
2016-04-01 20:14 ` [PATCH 5/8] btrfs: uapi/linux/btrfs.h migration, move balance flags Jeff Mahoney
2016-04-27 21:09   ` Liu Bo
2016-04-01 20:14 ` [PATCH 6/8] btrfs: uapi/linux/btrfs.h migration, move struct btrfs_ioctl_defrag_range_args Jeff Mahoney
2016-04-27 21:10   ` Liu Bo
2016-04-01 20:14 ` [PATCH 7/8] btrfs: uapi/linux/btrfs_tree.h migration, item types and defines Jeff Mahoney
2016-04-27 21:12   ` Liu Bo
2016-04-01 20:14 ` [PATCH 8/8] btrfs: uapi/linux/btrfs_tree.h, use __u8 and __u64 Jeff Mahoney
2016-04-27 21:12   ` Liu Bo
2016-04-27 19:37 ` [PATCH 0/8] btrfs: uapi migration for user-visible API components Josef Bacik
2016-04-27 22:42 ` David Sterba

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=1459541670-4097-3-git-send-email-jeffm@suse.com \
    --to=jeffm@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 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.