From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/3] splice: default to iter based versions implicitly
Date: Tue, 30 May 2017 08:11:15 +0100 [thread overview]
Message-ID: <20170530071115.GE6365@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170528094807.26801-2-hch@lst.de>
On Sun, May 28, 2017 at 12:48:05PM +0300, Christoph Hellwig wrote:
> If a file_operations instance has the read or write iter methods we should
> use the iter based splice code by default. We still allow to overide it
> with explicit ->read_iter and ->write_iter methods, but few of them are
> left, and there is a non-zero chance that we could get rid of them in the
> future.
->read_iter() side: you are changing behaviour for the following bunch:
arch/s390/hypfs/inode.c:437: .read_iter = hypfs_read_iter,
drivers/char/mem.c:798: .read_iter = read_iter_null,
drivers/char/mem.c:813: .read_iter = read_iter_zero,
drivers/char/mem.c:824: .read_iter = read_iter_zero,
drivers/char/raw.c:286: .read_iter = blkdev_read_iter,
drivers/net/tap.c:1134: .read_iter = tap_read_iter,
drivers/net/tun.c:2423: .read_iter = tun_chr_read_iter,
drivers/usb/gadget/function/f_fs.c:1254: .read_iter = ffs_epfile_read_iter,
drivers/usb/gadget/legacy/inode.c:704: .read_iter = ep_read_iter,
drivers/vhost/net.c:1249: .read_iter = vhost_net_chr_read_iter,
fs/9p/vfs_file.c:641: .read_iter = generic_file_read_iter,
fs/9p/vfs_file.c:652: .read_iter = generic_file_read_iter,
fs/9p/vfs_file.c:664: .read_iter = v9fs_file_read_iter,
fs/9p/vfs_file.c:675: .read_iter = v9fs_file_read_iter,
fs/9p/vfs_file.c:687: .read_iter = v9fs_mmap_file_read_iter,
fs/9p/vfs_file.c:698: .read_iter = v9fs_mmap_file_read_iter,
fs/fuse/cuse.c:180: .read_iter = cuse_read_iter,
fs/fuse/file.c:3027: .read_iter = fuse_direct_read_iter,
fs/hugetlbfs/inode.c:980: .read_iter = hugetlbfs_read_iter,
fs/ncpfs/file.c:248: .read_iter = ncp_file_read_iter,
fs/orangefs/file.c:743: .read_iter = orangefs_file_read_iter,
sound/core/pcm_native.c:3696: .read_iter = snd_pcm_readv,
All of them get generic_file_splice_read() for ->splice_read() (OK, modulo
your renaming). For some of them it's clearly the right thing to do;
however, that depends upon their ->read_iter() not doing anything that
wouldn't work on ITER_PIPE ones. Which deserves an explanation in commit
message, if nothing else.
ncpfs: OK
hugetlbfs: probably, but I would suggest testing that.
orangefs: OK
9p: can get nasty. It depends upon p9_client_read() being OK with ITER_PIPE.
It probably shouldn't be too hard to get working, but at the moment I won't
bet that it handles full pipe correctly, for example. At the very least, it
needs testing; the interesting setup is virtio with non-caching 9p over it.
fuse direct/cuse: *probably* should work (unless we already have bugs there,
which is not impossible). Needs testing.
drivers/char/mem: OK
drivers/char/raw: OK
hypfs: OK
vhost: dubious, but then so's read() there
gadget: might be OK, needs testing.
tun/tap: 100% *NOT* OK. ITER_PIPE won't work for those - not with
skipping holes in the buffer. This is hopelessly broken; leaving
a chunk of userland buffer unmodified is one thing, but doing that
to page we are putting into pipe? No go. At the very least, it
would need to turn that into iov_iter_zero(), followed by serious
testing.
sound: fuck, no.
next prev parent reply other threads:[~2017-05-30 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 9:48 splice simplification Christoph Hellwig
2017-05-28 9:48 ` [PATCH 1/3] splice: default to iter based versions implicitly Christoph Hellwig
2017-05-28 15:51 ` Jeff Layton
2017-05-30 7:11 ` Al Viro [this message]
2017-05-30 7:48 ` Al Viro
2017-05-28 9:48 ` [PATCH 2/3] splice: remove the old default splice_read/splice_write implementations Christoph Hellwig
2017-05-28 9:48 ` [PATCH 3/3] fs: mark vfs_readv and vfs_writev static Christoph Hellwig
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=20170530071115.GE6365@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.