diff options
author | Qu Wenruo <wqu@suse.com> | 2025-04-09 13:10:40 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:46 +0200 |
commit | cd678925e9f20e671fdb67a9e1d358ad445a8cc9 (patch) | |
tree | 05887f1f1e1812e33b9a251d36d2c0e20c20db73 /fs/btrfs/compression.c | |
parent | 6f3f722df7254b7e652e042a93f7e2b011223af0 (diff) |
btrfs: raid56: store a physical address in structure sector_ptr
Instead of using a @page + @pg_offset pair inside sector_ptr structure,
use a single physical address instead.
This allows us to grab both the page and offset from a single u64 value.
Although we still need an extra bool value, @has_paddr, to distinguish
if the sector is properly mapped (as the 0 physical address is totally
valid).
This change doesn't change the size of structure sector_ptr, but reduces
the parameters of several functions.
Note: the original idea and patch is from Christoph Hellwig
(https://lore.kernel.org/linux-btrfs/20250409111055.3640328-7-hch@lst.de/)
but the final implementation is different.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[ Use physical addresses instead to handle highmem. ]
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions