mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
Btrfs: Lower contention on the csum mutex
This takes the csum mutex deeper in the call chain and releases it more often. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
4854ddd0ed
commit
53863232ef
4 changed files with 22 additions and 8 deletions
|
@ -415,10 +415,8 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
|
|||
btrfs_set_trans_block_group(trans, inode);
|
||||
list_for_each(cur, list) {
|
||||
sum = list_entry(cur, struct btrfs_ordered_sum, list);
|
||||
mutex_lock(&BTRFS_I(inode)->csum_mutex);
|
||||
btrfs_csum_file_blocks(trans, BTRFS_I(inode)->root,
|
||||
inode, sum);
|
||||
mutex_unlock(&BTRFS_I(inode)->csum_mutex);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue