diff options
author | Filipe Manana <fdmanana@suse.com> | 2020-09-08 13:27:23 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 13:13:17 +0300 |
commit | 306bfec02b1054d24bbbeec49ece6db396d451e0 (patch) | |
tree | b26fec0821a1d4db4945dc917f8ee8412342be2b /fs/btrfs/reflink.c | |
parent | bf385648fa4805acf206254c77916edb58dbfe25 (diff) | |
download | linux-306bfec02b1054d24bbbeec49ece6db396d451e0.tar.xz |
btrfs: rename btrfs_punch_hole_range() to a more generic name
The function btrfs_punch_hole_range() is now used to replace all the file
extents in a given file range with an extent described in the given struct
btrfs_replace_extent_info argument. This extent can either be an existing
extent that is being cloned or it can be a new extent (namely a prealloc
extent). When that argument is NULL it only punches a hole (drops all the
existing extents) in the file range.
So rename the function to btrfs_replace_file_extents().
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reflink.c')
-rw-r--r-- | fs/btrfs/reflink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index dc8b5397e198..39b3269e5760 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -463,7 +463,7 @@ process_slot: clone_info.file_offset = new_key.offset; clone_info.extent_buf = buf; clone_info.is_new_extent = false; - ret = btrfs_punch_hole_range(inode, path, drop_start, + ret = btrfs_replace_file_extents(inode, path, drop_start, new_key.offset + datal - 1, &clone_info, &trans); if (ret) @@ -533,7 +533,7 @@ process_slot: btrfs_release_path(path); path->leave_spinning = 0; - ret = btrfs_punch_hole_range(inode, path, last_dest_end, + ret = btrfs_replace_file_extents(inode, path, last_dest_end, destoff + len - 1, NULL, &trans); if (ret) goto out; |