Commit a56dbd89400dd2cb9c91d734435dbfe059495da1
Committed by
Chris Mason
1 parent
0353808cae
Exists in
master
and in
16 other branches
Btrfs: remove btrfs_end_transaction_dmeta()
Two reasons: - btrfs_end_transaction_dmeta() is the same as btrfs_end_transaction_throttle() so it is unnecessary. - All the delayed items should be dealt in the current transaction, so the workers should not commit the transaction, instead, deal with the delayed items as many as possible. So we can remove btrfs_end_transaction_dmeta() Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Showing 3 changed files with 1 additions and 9 deletions Side-by-side Diff
fs/btrfs/delayed-inode.c
... | ... | @@ -1302,7 +1302,7 @@ |
1302 | 1302 | __btrfs_commit_inode_delayed_items(trans, path, delayed_node); |
1303 | 1303 | |
1304 | 1304 | trans->block_rsv = block_rsv; |
1305 | - btrfs_end_transaction_dmeta(trans, root); | |
1305 | + btrfs_end_transaction(trans, root); | |
1306 | 1306 | btrfs_btree_balance_dirty_nodelay(root); |
1307 | 1307 | |
1308 | 1308 | release_path: |
fs/btrfs/transaction.c
... | ... | @@ -790,12 +790,6 @@ |
790 | 790 | return __btrfs_end_transaction(trans, root, 1); |
791 | 791 | } |
792 | 792 | |
793 | -int btrfs_end_transaction_dmeta(struct btrfs_trans_handle *trans, | |
794 | - struct btrfs_root *root) | |
795 | -{ | |
796 | - return __btrfs_end_transaction(trans, root, 1); | |
797 | -} | |
798 | - | |
799 | 793 | /* |
800 | 794 | * when btree blocks are allocated, they have some corresponding bits set for |
801 | 795 | * them in one of two extent_io trees. This is used to make sure all of |
fs/btrfs/transaction.h
... | ... | @@ -154,8 +154,6 @@ |
154 | 154 | int wait_for_unblock); |
155 | 155 | int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans, |
156 | 156 | struct btrfs_root *root); |
157 | -int btrfs_end_transaction_dmeta(struct btrfs_trans_handle *trans, | |
158 | - struct btrfs_root *root); | |
159 | 157 | int btrfs_should_end_transaction(struct btrfs_trans_handle *trans, |
160 | 158 | struct btrfs_root *root); |
161 | 159 | void btrfs_throttle(struct btrfs_root *root); |