Thread (68 messages) 68 messages, 4 authors, 2021-01-27

Re: [PATCH v4 07/18] btrfs: attach private to dummy extent buffer pages

From: Qu Wenruo <hidden>
Date: 2021-01-21 03:46:46


On 2021/1/20 下午10:48, Josef Bacik wrote:
On 1/16/21 2:15 AM, Qu Wenruo wrote:
quoted
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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help