Re: xfs_file_splice_read: possible circular locking dependency detected

Al Viro <[email protected]>
Newsgroups gmane.comp.file-systems.xfs.general
Message-ID <[email protected]>
On Thu, Sep 08, 2016 at 09:44:50PM +0100, Al Viro wrote:

> Moreover, I don't see why we need to hold pipe lock the actual call of
> ->read_iter().  Right now we only grab it for "feed into pipe buffers"
> part.  Objections?

Actually, screw the "array of bvec"; we'd need to mark the ones that are
pagecache-backed somehow to tell which methods should be used.  Let's
add a variant of iov_iter that would be backed by pipe_buffer array;
copy_page_to_iter() fills the next slot with an extra reference to the
page we'd been given and using page_cache_pipe_buf_ops for ->ops.
copy_to_iter() adds to the last slot if it has default_pipe_buf_ops for
->ops and still has space in it or allocates a new page, sticks into the
next slot, copies data into it and sets default_pipe_ops for ->ops.

Then all we need is a variant of splice_to_pipe()/splice_{grow,shrink}_spd()
that would work with an array of pipe_buffer instead of page/partial_page
array pair.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.