btrfs: tree-log: convert defines to enums

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>
This commit is contained in:
David Sterba 2019-08-01 14:50:30 +02:00
parent 82253cb686
commit e13976cf12
1 changed files with 12 additions and 8 deletions

View File

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