Re: BUG in nfs_read_folio() when tracing is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jul 3, 2024, at 1:08 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> 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






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux