From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 3/5] fs: remove ki_nbytes Date: Thu, 5 Feb 2015 09:03:41 +0000 Message-ID: <20150205090341.GP29656@ZenIV.linux.org.uk> References: <20150204190645.GJ29656@ZenIV.linux.org.uk> <20150204230733.GK29656@ZenIV.linux.org.uk> <54D328C0.1070400@samsung.com> <20150205084729.GO29656@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alan Stern , Christoph Hellwig , Miklos Szeredi , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, Felipe Balbi , linux-usb@vger.kernel.org To: Robert Baldyga Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:48123 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbbBEJDr (ORCPT ); Thu, 5 Feb 2015 04:03:47 -0500 Content-Disposition: inline In-Reply-To: <20150205084729.GO29656@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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.