diff options
Diffstat (limited to 'fs/btrfs/tree-log.h')
| -rw-r--r-- | fs/btrfs/tree-log.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h index 1d4ae0d15a70..91b145fce333 100644 --- a/fs/btrfs/tree-log.h +++ b/fs/btrfs/tree-log.h | |||
| @@ -22,14 +22,28 @@ | |||
| 22 | /* return value for btrfs_log_dentry_safe that means we don't need to log it at all */ | 22 | /* return value for btrfs_log_dentry_safe that means we don't need to log it at all */ |
| 23 | #define BTRFS_NO_LOG_SYNC 256 | 23 | #define BTRFS_NO_LOG_SYNC 256 |
| 24 | 24 | ||
| 25 | struct btrfs_log_ctx { | ||
| 26 | int log_ret; | ||
| 27 | int log_transid; | ||
| 28 | struct list_head list; | ||
| 29 | }; | ||
| 30 | |||
| 31 | static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx) | ||
| 32 | { | ||
| 33 | ctx->log_ret = 0; | ||
| 34 | ctx->log_transid = 0; | ||
| 35 | INIT_LIST_HEAD(&ctx->list); | ||
| 36 | } | ||
| 37 | |||
| 25 | int btrfs_sync_log(struct btrfs_trans_handle *trans, | 38 | int btrfs_sync_log(struct btrfs_trans_handle *trans, |
| 26 | struct btrfs_root *root); | 39 | struct btrfs_root *root, struct btrfs_log_ctx *ctx); |
| 27 | int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); | 40 | int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); |
| 28 | int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, | 41 | int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, |
| 29 | struct btrfs_fs_info *fs_info); | 42 | struct btrfs_fs_info *fs_info); |
| 30 | int btrfs_recover_log_trees(struct btrfs_root *tree_root); | 43 | int btrfs_recover_log_trees(struct btrfs_root *tree_root); |
| 31 | int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, | 44 | int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, |
| 32 | struct btrfs_root *root, struct dentry *dentry); | 45 | struct btrfs_root *root, struct dentry *dentry, |
| 46 | struct btrfs_log_ctx *ctx); | ||
| 33 | int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, | 47 | int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, |
| 34 | struct btrfs_root *root, | 48 | struct btrfs_root *root, |
| 35 | const char *name, int name_len, | 49 | const char *name, int name_len, |
