[Linux-cachefs] [PATCH 5/5] ceph: fold ceph_update_writeable_page into ceph_write_begin

David Howells dhowells at redhat.com
Fri Jun 11 15:35:25 UTC 2021


Matthew Wilcox <willy at infradead.org> 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




More information about the Linux-cachefs mailing list