Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > Yes. I do that kind of thing in iomap. What you're doing there looks > a bit like offset_in_folio(), but I don't understand the problem with > just checking pos against i_size directly. pos can be in the middle of a page. If i_size is at, say, the same point in the middle of that page and the page isn't currently in the cache, then we'll just clear the entire page and not read the bottom part of it (ie. the bit prior to the EOF). It's odd, though, that xfstests doesn't catch this. David -- Linux-cachefs mailing list Linux-cachefs@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/linux-cachefs