Re: xfs_file_splice_read: possible circular locking dependency detected

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

 



On Thu, Sep 8, 2016 at 7:34 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> IDGI.  Suppose we do splice from file to pipe.  Everything had been in
> page cache, so we want to end up with pipe_buffers containing references
> to those page cache pages.  How do you propose to do that without having
> grabbed references to them?  What's to keep them from being freed by the
> time we get to reading from the pipe?

So that's obviously what we already do. That is, after all, why splice
doesn't actually keep track of "pages", it keeps track of "struct
pipe_buffer". So each page has not just offset/len associated with it,
but also a get/release/verify operation block and some flags with them
(it might not be a page-cache page, so in some cases it might be a skb
or something that needs different release semantics).

And if you can make the iterator basically interface with turning the
page/offset/len directly into a "struct pipe_buffer" and not do any
extra reference operations, then it actually would work very well.

But the way I read your description of what you'd do I just expected
you to have an extra "get/put" ref at the iterator level.

Maybe I misunderstood. I'd love to see a rough patch.

                           Linus

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux