]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: export the expected file extent through can_nocow_extent()
authorQu Wenruo <wqu@suse.com>
Mon, 29 Apr 2024 22:23:01 +0000 (07:53 +0930)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:20 +0000 (15:33 +0200)
commit87a6962f73b1e5892d06987904e8f3827bf3ceec
treef340b5a4f9a682ae2e95fb5624560fa47c048604
parente8fe524da027708793672e05fd4f17806855b0d8
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>
fs/btrfs/btrfs_inode.h
fs/btrfs/file.c
fs/btrfs/inode.c