Re: [PATCH 02/15] fs: Introduce i_blocks_per_page

From: Dave Chinner
Date: Mon Oct 07 2019 - 23:54:22 EST


On Fri, Oct 04, 2019 at 12:28:12PM -0700, Matthew Wilcox wrote:
> On Wed, Sep 25, 2019 at 06:36:50PM +1000, Dave Chinner wrote:
> > I'm actually working on abstrcting this code from both block size
> > and page size via the helpers below. We ahve need to support block
> > size > page size, and so that requires touching a bunch of all the
> > same code as this patchset. I'm currently trying to combine your
> > last patch set with my patchset so I can easily test allocating 64k
> > page cache pages on a 64k block size filesystem on a 4k page size
> > machine with XFS....
>
> This all makes sense ...
>
> > > - if (iop || i_blocksize(inode) == PAGE_SIZE)
> > > + if (iop || i_blocks_per_page(inode, page) <= 1)
> > > return iop;
> >
> > That also means checks like these become:
> >
> > if (iop || iomap_chunks_per_page(inode, page) <= 1)
> >
> > as a single file can now have multiple pages per block, a page per
> > block and multiple blocks per page as the page size changes...
> >
> > I'd like to only have to make one pass over this code to abstract
> > out page and block sizes, so I'm guessing we'll need to do some
> > co-ordination here....
>
> Yup. I'm happy if you want to send your patches out; I'll keep going
> with the patches I have for the moment, and we'll figure out how to
> merge the two series in a way that makes sense.

I'm waiting for the xfs -> iomap writeback changes to land in a
stable branch so I don't have to do things twice in slightly
different ways in the patchset. Once we get that in an iomap-next
branch I'll rebase my patches on top of it and go from there...

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx