From: Christoph Hellwig <hch@infradead.org>
To: David Wysochanski <dwysocha@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Chuck Lever III <chuck.lever@oracle.com>,
Dave Wysochanski <wysochanski@pobox.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: BUG in nfs_read_folio() when tracing is enabled
Date: Tue, 9 Jul 2024 23:33:05 -0700 [thread overview]
Message-ID: <Zo4rIUgiaOOXJ_sw@infradead.org> (raw)
In-Reply-To: <CALF+zOmzGNrovLCojgXUku4dV8p1r9gz8EDUVvBa6DC2BRqY2Q@mail.gmail.com>
On Tue, Jul 09, 2024 at 11:45:11AM -0400, David Wysochanski wrote:
> > > So Dave, I haven't tested the patch you posted a couple
> > > days ago, because there hasn't been a clear answer about
> > > whether nfs_read_folio() needs to protect itself against
> > > the ->mapping changing, in which case, that's probably
> > > a better fix.
> >
> > ->read_folio is called with the folio locked and only unlocks it
> > on I/O completion, so it doesn't really need any protection. So the
> > patch to simply move the trace point to before unlocking the folio
> > should fix the issue.
> >
> I didn't see this so maybe you sent it privately or I missed a message.
>
> > Alternatively we could just use the mapping from the inode variable
> > and pass it in.
> >
> I'm not sure I follow - are you suggesting fixing the tracepoint?
I'm suggesting to fix the tracepoint folio. I though I had something
out, but I guess it never made it.
> Regardless of possible tracepoint movement or other fixes,
> nfs_folio_length() needs to be patched because it should
> handle folio->mapping == NULL. Ditto for nfs_page_length().
nfs_page_length is completely unused and I've already sent a patch
to remove it. nfs_folio_length is only sanely usable with the
folio either locked or under writeback. So adding this random
check there is probably not a good idea, but an audit of the callers
would be very useful.
next prev parent reply other threads:[~2024-07-10 6:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 20:45 BUG in nfs_read_folio() when tracing is enabled Chuck Lever III
2024-07-02 20:59 ` David Wysochanski
2024-07-02 21:14 ` David Wysochanski
2024-07-02 21:17 ` Chuck Lever III
2024-07-02 21:33 ` David Wysochanski
2024-07-03 5:08 ` Christoph Hellwig
2024-07-05 13:45 ` Chuck Lever III
2024-07-05 13:47 ` Christoph Hellwig
2024-07-09 15:45 ` David Wysochanski
2024-07-10 6:33 ` Christoph Hellwig [this message]
2024-07-03 13:40 ` Chuck Lever III
2024-07-03 14:18 ` Christoph Hellwig
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=Zo4rIUgiaOOXJ_sw@infradead.org \
--to=hch@infradead.org \
--cc=chuck.lever@oracle.com \
--cc=dwysocha@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=wysochanski@pobox.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