linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-fsdevel@vger.kernel.org,
	Nicholas Piggin <npiggin@gmail.com>,
	Miklos Szeredi <mszeredi@redhat.com>
Subject: Re: [RFC] vmsplice() and ->steal()
Date: Sat, 10 Dec 2016 03:03:54 +0000	[thread overview]
Message-ID: <20161210030354.GI1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20161210023849.GH1555@ZenIV.linux.org.uk>

On Sat, Dec 10, 2016 at 02:38:49AM +0000, Al Viro wrote:
> 	vmsplice() generates pipe_bufs with ->steal() set to
> user_page_pipe_buf_steal().  What should happen when the source pages
> had code from an mmapped area and why shouldn't their ->steal()
> do what page_cache_pipe_buf_release() does in that case?
> 
> 	As it is, e.g. fuse_dev_splice_write() getting fed that stuff could,
> AFAICS, clear MappedToDisk on such a page, scream about weird pages
> (upon noticing non-NULL ->mapping) and fall back to copying (thankfully).
> We don't have that many ->steal() users (as the matter of fact, I've
> discovered that while trying to debug the breakage in one I'd been
> trying to add), but I really wonder about the intended semantics of
> ->steal().

	Hmm...  Nope, the source of breakage is different, and these
guys will simply fail ->steal() - pages present in page cache will
have refcount >= 2 due to the buf->page contributing to it.  My apologies...

	BTW, why doesn't page_cache_pipe_buf_steal() clear MappedToDisk
on its own in case of success?

  reply	other threads:[~2016-12-10  3:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10  2:38 [RFC] vmsplice() and ->steal() Al Viro
2016-12-10  3:03 ` Al Viro [this message]
2016-12-10  5:28   ` Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161210030354.GI1555@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).