On 1/23/21 3:36 PM, David Sterba wrote:
On Wed, Jan 20, 2021 at 10:05:56AM -0500, Josef Bacik wrote:
On 1/16/21 2:15 AM, Qu Wenruo wrote:
int try_release_extent_buffer(struct page *page)
{
struct extent_buffer *eb;
+ if (btrfs_sb(page->mapping->host->i_sb)->sectorsize < PAGE_SIZE)
+ return try_release_subpage_extent_buffer(page);
You're using sectorsize again here. I realize the problem is sectorsize !=
PAGE_SIZE, but sectorsize != nodesize all the time, so please change all of the
patches to check the actual relevant size for the data/metadata type. Thanks,
We had a long discussion with Qu about that on slack some time ago.
Right now we have sectorsize defining the data block size and also the
metadata unit size and check that as a constraint.
This is not perfect and does not cover all possible page/data/metadata
block size combinations and in the code looks odd, like in
scrub_checksum_tree_block, see the comment.
Adding the subpage support is quite intrusive and we can't cover all
size combinations at the same time so we agreed on first iteration where
sectorsize is still used as the nodesize constraint. This allows to test
the new code and the whole subpage infrastructure on real hw like arm64
or ppc64.
That we'll need to decouple sectorsize from the metadata won't be
forgotten, I've agreed with that conditionally and given how many
patches are floating around it'll become even harder to move forward
with the patches.
Alright that's fine, I'll ignore the weird mismatch'ed checks for now. Thanks,
Josef