summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-04-30 07:53:01 +0930
committerDavid Sterba <dsterba@suse.com>2024-07-11 15:33:20 +0200
commit87a6962f73b1e5892d06987904e8f3827bf3ceec (patch)
treef340b5a4f9a682ae2e95fb5624560fa47c048604 /fs/btrfs/file.c
parente8fe524da027708793672e05fd4f17806855b0d8 (diff)
downloadlinux-87a6962f73b1e5892d06987904e8f3827bf3ceec.tar.gz
linux-87a6962f73b1e5892d06987904e8f3827bf3ceec.tar.bz2
linux-87a6962f73b1e5892d06987904e8f3827bf3ceec.zip
btrfs: export the expected file extent through can_nocow_extent()
Currently function can_nocow_extent() only returns members needed for extent_map. However since we will soon change the extent_map structure to be more like btrfs_file_extent_item, we want to expose the expected file extent caused by the NOCOW write for future usage. This introduces a new structure, btrfs_file_extent, to be a more memory access friendly representation of btrfs_file_extent_item. And use that structure to expose the expected file extent caused by the NOCOW write. For now there is no user of the new structure yet. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index ebb769777da4..e3ef1659b6ae 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1104,7 +1104,7 @@ int btrfs_check_nocow_lock(struct btrfs_inode *inode, loff_t pos,
&cached_state);
}
ret = can_nocow_extent(&inode->vfs_inode, lockstart, &num_bytes,
- NULL, NULL, NULL, nowait, false);
+ NULL, NULL, NULL, NULL, nowait, false);
if (ret <= 0)
btrfs_drew_write_unlock(&root->snapshot_lock);
else