From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:36191 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932092AbeE1JgG (ORCPT ); Mon, 28 May 2018 05:36:06 -0400 Cc: mtk.manpages@gmail.com, linux-fsdevel@vger.kernel.org, Goldwyn Rodrigues Subject: Re: [PATCH] write.2: Partial direct I/O writes To: Goldwyn Rodrigues , linux-man@vger.kernel.org References: <20180521113231.13506-1-rgoldwyn@suse.de> From: "Michael Kerrisk (man-opages)" Message-ID: Date: Mon, 28 May 2018 11:36:00 +0200 MIME-Version: 1.0 In-Reply-To: <20180521113231.13506-1-rgoldwyn@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello Goldwyn, On 05/21/2018 01:32 PM, Goldwyn Rodrigues wrote: > Direct writes can perform partial writes because large writes > can be broken into smaller chunks by the block layer. Part of > the I/O submitted can fail and the failure is returned to write > as an error in the return value. However, part of the write can > be successful which means that data at the offset is inconsistent. > > Signed-off-by: Goldwyn Rodrigues Thanks. Applied. Cheers, Michael > diff --git a/man2/write.2 b/man2/write.2 > index f8a94f3ff..d6e14aaf0 100644 > --- a/man2/write.2 > +++ b/man2/write.2 > @@ -274,6 +274,14 @@ On Linux, > returning the number of bytes actually transferred. > .\" commit e28cc71572da38a5a12c1cfe4d7032017adccf69 > (This is true on both 32-bit and 64-bit systems.) > +.PP > +An error return value while performing > +.BR write() > +using direct I/O does not mean the > +entire write has failed. Partial data may be written > +and the data at the file offset on which the > +.BR write() > +was attempted should be considered inconsistent. > .SH BUGS > According to POSIX.1-2008/SUSv4 Section XSI 2.9.7 > ("Thread Interactions with Regular File Operations"): > -- > To unsubscribe from this list: send the line "unsubscribe linux-man" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >