Re: [PATCH v2 04/12] mm/filemap: Add mapping_seek_hole_data

From: Matthew Wilcox
Date: Tue Sep 29 2020 - 09:39:26 EST


On Tue, Sep 29, 2020 at 01:42:51PM +0100, Matthew Wilcox wrote:
> On Tue, Sep 29, 2020 at 10:46:53AM +0200, Jan Kara wrote:
> > Also for shmem you've dropped the PageUptodate check which I'm not sure is
> > safe?
>
> That was unintentional. I did run xfstests against this patch (just did
> it again ... it passes), so I suspect it doesn't create a !Uptodate page.
> I'll see if I can enhance the existing xfstests to catch this case.

Ah. Diff'ing the output between before and after ...

-Test skipped as fs doesn't support unwritten extents.
+07.01 SEEK_HOLE expected 0 or 45056, got 0. succ
+07.02 SEEK_HOLE expected 1 or 45056, got 1. succ
+07.03 SEEK_DATA expected 40960 or 40960, got 40960. succ
+07.04 SEEK_DATA expected 40960 or 40960, got 40960. succ

so, er, the tests didn't report that I'd broken it because it was just an
automatically skipped test. Not sure what to do about that; obviously
we should skip tests that aren't applicable, but it'd be nice to see a
warning that tmpfs used to support this and now doesn't.