On Wed, Nov 10, 2021 at 03:52:01PM +0100, Andreas Gruenbacher wrote:
Hmm, that doesn't make sense to me: the filesystem doesn't know that iomap_readpage will pad to page boundaries. This happens at the iomap layer, so the iomap layer should also deal with the consequences. We're using different alignment rules here and for direct I/O, so that makes fake-aligning the extent size in iomap_begin even more questionable.
"Fixing" the extent size the filesystem returns would also break direct I/O. We could add some additional padding code to iomap_dio_inline_iter to deal with that, but currently, there's no need for that.
The iomap mapping sizes are read-only to iomap for a good reason. You can't just break that design.