mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +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
|
@ -1027,8 +1027,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
|
|||
BUG_ON(!trans);
|
||||
|
||||
/* punch hole in destination first */
|
||||
btrfs_drop_extents(trans, root, inode, off, off + len,
|
||||
off + len, 0, &hint_byte, 1);
|
||||
btrfs_drop_extents(trans, inode, off, off + len, &hint_byte, 1);
|
||||
|
||||
/* clone data */
|
||||
key.objectid = src->i_ino;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue