From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 3/5] fs: remove ki_nbytes Date: Sat, 7 Feb 2015 05:44:19 +0000 Message-ID: <20150207054419.GY29656@ZenIV.linux.org.uk> References: <20150204230733.GK29656@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Miklos Szeredi , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, Felipe Balbi , linux-usb@vger.kernel.org To: Alan Stern Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Feb 05, 2015 at 10:29:42AM -0500, Alan Stern wrote: > On Wed, 4 Feb 2015, Al Viro wrote: > > > > > Um... readv() is also going through ->aio_read(). > > > > > > Why does readv() do this but not read()? Wouldn't it make more sense > > > to have all the read* calls use the same internal interface? > > > > Because there are two partially overlapping classes wrt vector IO semantics: > ... > > Thanks for the detailed explanation. It appears to boil down to a > series of historical accidents. > > In any case, feel free to copy the non-isochronous behavior of the > synchronous routines in the async routines. It certainly won't hurt > anything. OK, I've limited it to sync ones, actually. Preliminary series in followups. Those who prefer to read in git, see git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #gadget WARNING: completely untested Al Viro (6): new helper: dup_iter() gadget/function/f_fs.c: close leaks gadget/function/f_fs.c: use put iov_iter into io_data gadget/function/f_fs.c: switch to ->{read,write}_iter() gadgetfs: use-after-free in ->aio_read() gadget: switch ep_io_operations to ->read_iter/->write_iter drivers/usb/gadget/function/f_fs.c | 204 +++++++++------------- drivers/usb/gadget/legacy/inode.c | 346 +++++++++++++++---------------------- include/linux/uio.h | 2 + mm/iov_iter.c | 15 ++ 4 files changed, 237 insertions(+), 330 deletions(-) -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org