On 2021/1/20 下午10:48, Josef Bacik wrote:
On 1/16/21 2:15 AM, Qu Wenruo wrote:
Even for regular btrfs, there are locations where we allocate dummy
extent buffers for temporary usage.
Like tree_mod_log_rewind() and get_old_root().
Those dummy extent buffers will be handled by the same eb accessors, and
if they don't have page::private subpage eb accessors can fail.
To address such problems, make __alloc_dummy_extent_buffer() to attach
page private for dummy extent buffers too.
Signed-off-by: Qu Wenruo <w...@suse.com>
We already know these eb's are fake because they have UNMAPPED set, just
adjust your subpage helpers to be no-op if UNMAPPED is set. Thanks,
But then the helper behavior would be a mess.
Some accessors, like read/write_extent_buffer() will still do subpage
specific offset calcuation, even it has UNMAPPED bit.
Thus I still prefer to do the same operations, reducing the branches in
accessors.
Thanks,
Qu
Josef