From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91170C433DF for ; Wed, 10 Jun 2020 21:19:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63D8A2072E for ; Wed, 10 Jun 2020 21:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591823966; bh=kKyDiU0/UB9Ct/ho+PM0wjzZ9KjHfNMjLQ0wPGw7GWg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=WXSwvZ4guoF5uPSIovVaND7ocRcRrw1KS1xhYoy6BN2jOsdCPQ2RtsoN80et+wD5d 5/99JfEiaadzLdXZju1RjRPu8IjZqxJ3W3/XF1ehMd/YPX7tUbUBpv57Y1Xr/mgVmQ TlnM47uhkSR0GT6xPjq5V8c+5wSQtr9zDNlYYa4Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgFJVTZ (ORCPT ); Wed, 10 Jun 2020 17:19:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:58576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgFJVTY (ORCPT ); Wed, 10 Jun 2020 17:19:24 -0400 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 985B72072E; Wed, 10 Jun 2020 21:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591823964; bh=kKyDiU0/UB9Ct/ho+PM0wjzZ9KjHfNMjLQ0wPGw7GWg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=K3A/3KYtsM442gkErVWP+R/oKC3+bEGFkDcxGE0Taod/Ze0sSh/kk9wGw8LPFdt83 VtTluqRNcgOYIqzQbIt4tzRs/dmQB2UC+QX5IifWsfiLdO2gXomYBut4GwPiy1+8Ht BiwO5pGz0OPtA3UEDICp3f7Igysr3pE/+c6hZazE= Message-ID: Subject: Re: [PATCH][man-pages] sync.2: syncfs() now returns errors if writeback fails From: Jeff Layton To: Eric Biggers Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 10 Jun 2020 17:19:22 -0400 In-Reply-To: <20200610155013.GA1339@sol.localdomain> References: <20200610103347.14395-1-jlayton@kernel.org> <20200610155013.GA1339@sol.localdomain> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-06-10 at 08:50 -0700, Eric Biggers wrote: > On Wed, Jun 10, 2020 at 06:33:47AM -0400, Jeff Layton wrote: > > A patch has been merged for v5.8 that changes how syncfs() reports > > errors. Change the sync() manpage accordingly. > > > > Signed-off-by: Jeff Layton > > --- > > man2/sync.2 | 24 +++++++++++++++++++++++- > > 1 file changed, 23 insertions(+), 1 deletion(-) > > > > diff --git a/man2/sync.2 b/man2/sync.2 > > index 7198f3311b05..27e04cff5845 100644 > > --- a/man2/sync.2 > > +++ b/man2/sync.2 > > @@ -86,11 +86,26 @@ to indicate the error. > > is always successful. > > .PP > > .BR syncfs () > > -can fail for at least the following reason: > > +can fail for at least the following reasons: > > .TP > > .B EBADF > > .I fd > > is not a valid file descriptor. > > +.TP > > +.B EIO > > +An error occurred during synchronization. > > +This error may relate to data written to any file on the filesystem, or on > > +metadata related to the filesytem itself. > > +.TP > > +.B ENOSPC > > +Disk space was exhausted while synchronizing. > > +.TP > > +.BR ENOSPC ", " EDQUOT > > +Data was written to a files on NFS or another filesystem which does not > > +allocate space at the time of a > > +.BR write (2) > > +system call, and some previous write failed due to insufficient > > +storage space. > > .SH VERSIONS > > .BR syncfs () > > first appeared in Linux 2.6.39; > > @@ -121,6 +136,13 @@ or > > .BR syncfs () > > provide the same guarantees as fsync called on every file in > > the system or filesystem respectively. > > +.PP > > +In mainline kernel versions prior to 5.8, > > +.\" commit 735e4ae5ba28c886d249ad04d3c8cc097dad6336 > > +.BR syncfs () > > +will only fail with EBADF when passed a bad file descriptor. In 5.8 > > +and later kernels, it will also report an error if one or more inodes failed > > +to be written back since the last syncfs call. > > The sentence "In mainline kernel versions prior to 5.8, syncfs() will only fail > with EBADF when passed a bad file descriptor" is ambiguous. It could mean that > EBADF can now mean other things too. > > Maybe write: "In mainline kernel versions prior to 5.8, syncfs() will only fail > when passed a bad file descriptor (EBADF)." > > - Eric Good point. Fixed in my tree using your verbiage. I'll send out a v2 patch once I give others a chance to comment. Thanks! -- Jeff Layton