Skip to content

Commit a56dbd8

Browse files
Miao XieChris Mason
authored andcommitted
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>
1 parent 0353808 commit a56dbd8

3 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎fs/btrfs/delayed-inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ static void btrfs_async_run_delayed_root(struct btrfs_work *work)
13021302
__btrfs_commit_inode_delayed_items(trans, path, delayed_node);
13031303

13041304
trans->block_rsv = block_rsv;
1305-
btrfs_end_transaction_dmeta(trans, root);
1305+
btrfs_end_transaction(trans, root);
13061306
btrfs_btree_balance_dirty_nodelay(root);
13071307

13081308
release_path:

‎fs/btrfs/transaction.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -790,12 +790,6 @@ int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans,
790790
return __btrfs_end_transaction(trans, root, 1);
791791
}
792792

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-
799793
/*
800794
* when btree blocks are allocated, they have some corresponding bits set for
801795
* them in one of two extent_io trees. This is used to make sure all of

‎fs/btrfs/transaction.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans,
154154
int wait_for_unblock);
155155
int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans,
156156
struct btrfs_root *root);
157-
int btrfs_end_transaction_dmeta(struct btrfs_trans_handle *trans,
158-
struct btrfs_root *root);
159157
int btrfs_should_end_transaction(struct btrfs_trans_handle *trans,
160158
struct btrfs_root *root);
161159
void btrfs_throttle(struct btrfs_root *root);

0 commit comments

Comments
 (0)