xfs_file_splice_read: possible circular locking dependency detected

Linus Torvalds torvalds at linux-foundation.org
Thu Sep 8 21:26:44 CDT 2016


On Thu, Sep 8, 2016 at 7:22 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> On Thu, Sep 8, 2016 at 6:53 PM, Dave Chinner <david at fromorbit.com> 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



More information about the xfs mailing list