btrfs: convert QGROUP_* defines to enum bits
authorDavid Sterba <dsterba@suse.com>
Fri, 9 Sep 2022 15:37:35 +0000 (17:37 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:40 +0000 (18:00 +0100)
The defines/enums are used only for tracepoints and are not part of the
on-disk format.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.h

index 578c77e94200f580918149609673588444be9a2f..3fb5459c930952051cd565e12b0c0713e0f705ac 100644 (file)
@@ -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);