Re: [PATCH v12 00/10] enable bs > ps in XFS

David Howells
2024-08-19T11:59:50Z

David Howells <dhowells@redhat.com> wrote:

> You can see the invalidate_folio call, with the offset at 0x4 an the length as
> 0x1ffc. The data at the beginning of the page is 0x78787878. This looks
> correct.
>
> Then second ftruncate() is called to increase the file size to 4096
> (ie. 0x1000):
>
> pankaj-5833: netfs_truncate: ni=9e isz=4 rsz=4 zp=4 to=1000
> pankaj-5833: netfs_inval_folio: pfn=116fec i=0009e ix=00000-00001 o=1000 l=1000 d=78787878
> pankaj-5833: netfs_folio: pfn=116fec i=0009e ix=00000-00001 inval-part
> pankaj-5833: netfs_set_size: ni=9e resize-file isz=1000 rsz=1000 zp=4
>
> And here's the problem: in the invalidate_folio() call, the offset is 0x1000
> and the length is 0x1000 (o= and l=). But that's the wrong half of the folio!
> I'm guessing that the caller thereafter clears the other half of the folio -
> the bit that should be kept.

Actually, I think I'm wrong in my evaluation - I think that's the region to be
invalidated, not the region to be kept.

David