From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [5.15 REGRESSION] iomap: Fix inline extent handling in iomap_readpage
Date: Wed, 10 Nov 2021 15:52:01 +0100 [thread overview]
Message-ID: <CAHc6FU49TnYvrL-FU5oz9th6STuQ=eYokjsD+0QpbkdHedRd9w@mail.gmail.com> (raw)
In-Reply-To: <20211110125527.GA25465@lst.de>
On Wed, Nov 10, 2021 at 1:55 PM Christoph Hellwig <hch@lst.de> wrote:
> On Wed, Nov 10, 2021 at 12:38:42PM +0100, Andreas Gruenbacher wrote:
> > + if (iomap->type == IOMAP_INLINE) {
> > + /*
> > + * The filesystem sets iomap->length to the size of the inline
> > + * data. We're at the end of the file, so we know that the
> > + * rest of the page needs to be zeroed out.
> > + */
> > + iomap->length = iomap_read_inline_data(iter, page);
> > + return iomap->length;
>
> You can't just change iomap->length here. Fix the file system to
> return the right length, please.
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.
Thanks,
Andreas
next prev parent reply other threads:[~2021-11-10 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 11:38 [Cluster-devel] [5.15 REGRESSION] iomap: Fix inline extent handling in iomap_readpage Andreas Gruenbacher
2021-11-10 12:55 ` Christoph Hellwig
2021-11-10 14:52 ` Andreas Gruenbacher [this message]
2021-11-11 7:25 ` Christoph Hellwig
2021-11-11 16:21 ` Andreas Grünbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHc6FU49TnYvrL-FU5oz9th6STuQ=eYokjsD+0QpbkdHedRd9w@mail.gmail.com' \
--to=agruenba@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).