From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Add preadv2/pwritev2 documentation. Date: Fri, 27 Mar 2015 09:49:32 -0700 Message-ID: <20150327094932.31b5c9fc.akpm@linux-foundation.org> References: <1426530746-32222-1-git-send-email-milosz@adfin.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426530746-32222-1-git-send-email-milosz@adfin.com> Sender: linux-fsdevel-owner@vger.kernel.org To: Milosz Tanski Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, Mel Gorman , Volker Lendecke , Tejun Heo , Jeff Moyer , Theodore Ts'o , Al Viro , linux-api@vger.kernel.org, Michael Kerrisk , linux-arch@vger.kernel.org, Dave Chinner List-Id: linux-arch.vger.kernel.org On Mon, 16 Mar 2015 14:32:26 -0400 Milosz Tanski wrote: > +.BR pwritev2 () > can also fail for the same reasons as > .BR lseek (2). > -Additionally, the following error is defined: > +Additionally, the following errors are defined: > +.TP > +.B EAGAIN > +The operation would block. This is possible if the file descriptor \fIfd\fP refers to a socket and has been marked nonblocking > +.RB ( O_NONBLOCK ), > +or the operation is a > +.BR preadv2 > +and the \fIflags\fP argument is set to > +.BR RWF_NONBLOCK. Can you please expand on this to describe the circumstances in which pread2() returns -EAGAIN? Let's fix up the short-read confusion. And let's have a think about EAGAIN vs EWOULDBLOCK. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46488 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753782AbbC0QsU (ORCPT ); Fri, 27 Mar 2015 12:48:20 -0400 Date: Fri, 27 Mar 2015 09:49:32 -0700 From: Andrew Morton Subject: Re: [PATCH] Add preadv2/pwritev2 documentation. Message-ID: <20150327094932.31b5c9fc.akpm@linux-foundation.org> In-Reply-To: <1426530746-32222-1-git-send-email-milosz@adfin.com> References: <1426530746-32222-1-git-send-email-milosz@adfin.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Milosz Tanski Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, Mel Gorman , Volker Lendecke , Tejun Heo , Jeff Moyer , Theodore Ts'o , Al Viro , linux-api@vger.kernel.org, Michael Kerrisk , linux-arch@vger.kernel.org, Dave Chinner Message-ID: <20150327164932.gEckE3dMxoruFH1VIUv1pcfOL4brIr8b-LFw8efEe6Y@z> On Mon, 16 Mar 2015 14:32:26 -0400 Milosz Tanski wrote: > +.BR pwritev2 () > can also fail for the same reasons as > .BR lseek (2). > -Additionally, the following error is defined: > +Additionally, the following errors are defined: > +.TP > +.B EAGAIN > +The operation would block. This is possible if the file descriptor \fIfd\fP refers to a socket and has been marked nonblocking > +.RB ( O_NONBLOCK ), > +or the operation is a > +.BR preadv2 > +and the \fIflags\fP argument is set to > +.BR RWF_NONBLOCK. Can you please expand on this to describe the circumstances in which pread2() returns -EAGAIN? Let's fix up the short-read confusion. And let's have a think about EAGAIN vs EWOULDBLOCK.