mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
Btrfs: Rewrite btrfs_drop_extents
Rewrite btrfs_drop_extents by using btrfs_duplicate_item, so we can avoid calling lock_extent within transaction. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
ad48fd7546
commit
920bbbfb05
5 changed files with 288 additions and 434 deletions
|
@ -542,8 +542,8 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
|
|||
|
||||
saved_nbytes = inode_get_bytes(inode);
|
||||
/* drop any overlapping extents */
|
||||
ret = btrfs_drop_extents(trans, root, inode,
|
||||
start, extent_end, extent_end, start, &alloc_hint, 1);
|
||||
ret = btrfs_drop_extents(trans, inode, start, extent_end,
|
||||
&alloc_hint, 1);
|
||||
BUG_ON(ret);
|
||||
|
||||
if (found_type == BTRFS_FILE_EXTENT_REG ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue