From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Baldyga Subject: Re: [PATCH 3/5] fs: remove ki_nbytes Date: Thu, 05 Feb 2015 10:15:59 +0100 Message-ID: <54D334CF.3050507@samsung.com> References: <20150204190645.GJ29656@ZenIV.linux.org.uk> <20150204230733.GK29656@ZenIV.linux.org.uk> <54D328C0.1070400@samsung.com> <20150205084729.GO29656@ZenIV.linux.org.uk> <20150205090341.GP29656@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Alan Stern , Christoph Hellwig , Miklos Szeredi , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, Felipe Balbi , linux-usb@vger.kernel.org To: Al Viro Return-path: In-reply-to: <20150205090341.GP29656@ZenIV.linux.org.uk> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On 02/05/2015 10:03 AM, Al Viro wrote: > On Thu, Feb 05, 2015 at 08:47:29AM +0000, Al Viro wrote: >> You are confusing datagram-per-syscall (which they are) with >> datagram-per-iovec (which they are definitely not). IOW, they behave >> as UDP sockets - writev() is purely scatter-gather variant of write(), >> with datagram per syscall and all vector elements silently concatenated. >> That's class 2, and _not_ in its intersection with class 1. > > PS: you want class 1, look at something like /proc/sys/kernel/domainname > (or any other sysctl of that sort). write "foobar" there and > cat /proc/sys/kernel/domainname will print foorbat. writev an array consisting > of "foo" and "bar", and you'll see bar afterwards, same as you would > after writing first "foo", then "bar". There the iovec boundaries affect > the result - ->no aio_write() for that sucker, so we get two calls of > ->write(), with expected results. And there are character devices like that > as well. _That_ is class 1 outside of intersection with class 2. > Oh, I see. Thanks. So we only need to add endpoint halting to aio_read()/aio_write(), to make their behaviour similar to sync ones, right? Robert Baldyga -- 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