| To: | Al Viro <viro@xxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: xfs_file_splice_read: possible circular locking dependency detected |
| From: | Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> |
| Date: | Thu, 8 Sep 2016 19:50:05 -0700 |
| Cc: | Dave Chinner <david@xxxxxxxxxxxxx>, CAI Qian <caiqian@xxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=q+sOXTKbYNLaMkypOzcfiHQLxO2ynut8kh1wFDvpTME=; b=jNh20TTQcLpxBYQDTUfhsqqaREI0M8z4pTVLWcKwa2I6CF9Kmtshb9Hh9sJpXSzlXH +z0h6vW3NYrHaBL+SEhP0zg3aHWrG8yWr3WN7NjWOYQD/fvHCwJBhnjwQHgv253vL/kq kfri5jmtm8j3rycpzR7GitJN1lglz6zU/fLfokusgDkqJG8SAhoRbO7cX+OdN2TKAYwA jicPu0Q+pzP8+I1EnD/oFepUuzmcWFvKfM5dLT0rlsnxB0h8dcIFawyimdw/wGzyipa+ MG7g0It8KzfpYuGzIodni7symhAicPqcfGTbeunUvBrZWepsyHmV/sYh+JPj9HYOJQhI vPlQ== |
| In-reply-to: | <20160909023452.GO2356@xxxxxxxxxxxxxxxxxx> |
| References: | <1832555471.1341372.1472835736236.JavaMail.zimbra@xxxxxxxxxx> <20160903003919.GI30056@dastard> <1450936953.949798.1473348551588.JavaMail.zimbra@xxxxxxxxxx> <20160908175632.GH2356@xxxxxxxxxxxxxxxxxx> <CA+55aFzg+Q0DzFNBR9TeL13_yfrfFwHu9OrZe--Zpje0EeN4Cw@xxxxxxxxxxxxxx> <20160908213835.GY30056@dastard> <20160908235521.GL2356@xxxxxxxxxxxxxxxxxx> <20160909015324.GD30056@dastard> <CA+55aFzohsUXj_3BeFNr2t50Wm=G+7toRDEz=Tk7VJqP3n1hXQ@xxxxxxxxxxxxxx> <CA+55aFxrqCng2Qxasc9pyMrKUGFjo==fEaFT1vkH9Lncte3RgQ@xxxxxxxxxxxxxx> <20160909023452.GO2356@xxxxxxxxxxxxxxxxxx> |
| Sender: | linus971@xxxxxxxxx |
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
|
| Previous by Date: | Re: xfs_file_splice_read: possible circular locking dependency detected, Linus Torvalds |
|---|---|
| Next by Date: | [PATCH] xfs_logprint: fix the transcation type string for delaylog-enabled fs, Hou Tao |
| Previous by Thread: | Re: xfs_file_splice_read: possible circular locking dependency detected, Al Viro |
| Next by Thread: | Re: xfs_file_splice_read: possible circular locking dependency detected, Al Viro |
| Indexes: | [Date] [Thread] [Top] [All Lists] |