public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: David Wysochanski <dwysocha@redhat.com>,
	Dave Wysochanski <wysochanski@pobox.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: BUG in nfs_read_folio() when tracing is enabled
Date: Fri, 5 Jul 2024 13:45:11 +0000	[thread overview]
Message-ID: <FF24B77F-638E-4F31-ABB6-B07D48AF73B4@oracle.com> (raw)
In-Reply-To: <ZoTc3-Bzfr-gY4-o@infradead.org>



> On Jul 3, 2024, at 1:08 AM, Christoph Hellwig <hch@infradead.org> wrote:
> 
> On Tue, Jul 02, 2024 at 05:33:58PM -0400, David Wysochanski wrote:
> 
> [annoying full quote snipped]
> 
>> Was your test running both reads and truncates on the same file in parallel?
>> 
>> Once the read completes I believe the page is unlocked.  Then if
>> truncates are running in parallel, then I think this can happen
>> (folio->mapping = NULL as a result of truncate).
> 
> Yes, folio->mapping is only stable when the folio is locked.

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.


--
Chuck Lever



  reply	other threads:[~2024-07-05 13:45 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 [this message]
2024-07-05 13:47           ` Christoph Hellwig
2024-07-09 15:45             ` David Wysochanski
2024-07-10  6:33               ` Christoph Hellwig
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=FF24B77F-638E-4F31-ABB6-B07D48AF73B4@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=dwysocha@redhat.com \
    --cc=hch@infradead.org \
    --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