Re: xfs_file_splice_read: possible circular locking dependency detected

Linus Torvalds <[email protected]> Thu, 8 Sep 2016 19:26:44 -0700
Newsgroups gmane.comp.file-systems.xfs.general
Message-ID <CA+55aFxrqCng2Qxasc9pyMrKUGFjo==fEaFT1vkH9Lncte3RgQ@mail.gmail.com>
On Thu, Sep 8, 2016 at 7:22 PM, Linus Torvalds
<[email protected]> wrote:
> On Thu, Sep 8, 2016 at 6:53 PM, Dave Chinner <[email protected]> wrote:
>>
>> So if we race iwth a truncate, the pages in spd.pages[] that are
>> beyond the new EOF may or may not have been removed from the page
>> cache.
>
> So I'm not sure why we'd need to care?

Side note, just to clarify: I'm not actually convinced that turning
things into page/offset/len tuples is the right thing to do.

I still suspect that the reference count updates on each page may not
be a good idea.  I suspect we'd easily be better off trying to do
everything under the pipe lock exactly so that we can *avoid* having
to do per-page "increment ref-count, then decrement it again". But the
locking would have to be changed radically for us to be able to do
that (and the only sane model ios, I think, to make pipe_lock be the
outermost lock, and outside *every* downcall)

               Linus

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs