OSDN Git Service

btrfs: tree-log: convert defines to enums
authorDavid Sterba <dsterba@suse.com>
Thu, 1 Aug 2019 12:50:30 +0000 (14:50 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:03 +0000 (14:59 +0200)
Used only for in-memory state tracking.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c

index 188e6f7..0b85b2f 100644 (file)
  * LOG_INODE_EXISTS means to log just enough to recreate the inode
  * during log replay
  */
-#define LOG_INODE_ALL 0
-#define LOG_INODE_EXISTS 1
-#define LOG_OTHER_INODE 2
-#define LOG_OTHER_INODE_ALL 3
+enum {
+       LOG_INODE_ALL,
+       LOG_INODE_EXISTS,
+       LOG_OTHER_INODE,
+       LOG_OTHER_INODE_ALL,
+};
 
 /*
  * directory trouble cases
  * The last stage is to deal with directories and links and extents
  * and all the other fun semantics
  */
-#define LOG_WALK_PIN_ONLY 0
-#define LOG_WALK_REPLAY_INODES 1
-#define LOG_WALK_REPLAY_DIR_INDEX 2
-#define LOG_WALK_REPLAY_ALL 3
+enum {
+       LOG_WALK_PIN_ONLY,
+       LOG_WALK_REPLAY_INODES,
+       LOG_WALK_REPLAY_DIR_INDEX,
+       LOG_WALK_REPLAY_ALL,
+};
 
 static int btrfs_log_inode(struct btrfs_trans_handle *trans,
                           struct btrfs_root *root, struct btrfs_inode *inode,