linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 5/6] btrfs: convert QGROUP_* defines to enum bits
Date: Tue, 11 Oct 2022 14:58:56 +0200	[thread overview]
Message-ID: <2bd0d78d5dcdb94ce6df35ecf70d1586febcb1f5.1665492943.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1665492943.git.dsterba@suse.com>

The defines/enums are used only for tracepoints and are not part of the
on-disk format.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/qgroup.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h
index 578c77e94200..3fb5459c9309 100644
--- a/fs/btrfs/qgroup.h
+++ b/fs/btrfs/qgroup.h
@@ -11,6 +11,7 @@
 #include <linux/kobject.h>
 #include "ulist.h"
 #include "delayed-ref.h"
+#include "misc.h"
 
 /*
  * Btrfs qgroup overview
@@ -242,9 +243,11 @@ static inline u64 btrfs_qgroup_subvolid(u64 qgroupid)
 /*
  * For qgroup event trace points only
  */
-#define QGROUP_RESERVE		(1<<0)
-#define QGROUP_RELEASE		(1<<1)
-#define QGROUP_FREE		(1<<2)
+enum {
+	ENUM_BIT(QGROUP_RESERVE),
+	ENUM_BIT(QGROUP_RELEASE),
+	ENUM_BIT(QGROUP_FREE),
+};
 
 int btrfs_quota_enable(struct btrfs_fs_info *fs_info);
 int btrfs_quota_disable(struct btrfs_fs_info *fs_info);
-- 
2.37.3


  parent reply	other threads:[~2022-10-11 12:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 12:58 [PATCH 0/6] Enumerated bits in enum David Sterba
2022-10-11 12:58 ` [PATCH 1/6] btrfs: add helper for bit enumeration David Sterba
2022-10-11 12:58 ` [PATCH 2/6] btrfs: convert BTRFS_ILOCK-* defines to enum bit David Sterba
2022-10-11 12:58 ` [PATCH 3/6] btrfs: convert extent_io page op defines to enum bits David Sterba
2022-10-11 12:58 ` [PATCH 4/6] btrfs: convert EXTENT_* bits to enums David Sterba
2022-10-11 12:58 ` David Sterba [this message]
2022-10-11 12:58 ` [PATCH 6/6] btrfs: convert __TRANS_* defines to enum bits David Sterba
2022-10-14 12:58 ` [PATCH 0/6] Enumerated bits in enum Josef Bacik

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=2bd0d78d5dcdb94ce6df35ecf70d1586febcb1f5.1665492943.git.dsterba@suse.com \
    --to=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;
as well as URLs for NNTP newsgroup(s).