Re: [RFC PATCH V3] iomap: add support to track dirty state of sub pages

From: Christoph Hellwig
Date: Sat Aug 22 2020 - 12:43:59 EST


On Sat, Aug 22, 2020 at 03:24:14PM +0100, Matthew Wilcox wrote:
> The case I was worrying about:
>
> fill a filesystem so that free space is very fragmented
> readahead into a hole
> hole is large, don't allocate an iop
> writeback the page
> don't have an iop, can't track the write count
>
> I'd be fine with choosing to allocate an iop later (and indeed I do that
> as part of the THP work). But does this scenario make you think of any
> other corner cases?

Can't think of a corner case. And as said last time this comes up I
think trying to allocate the iop as late and lazy as possible is
probably a good thing. I just went for the dumb way because it was
simpler and already a huge improvement over buffer heads.