Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp126184ybt; Thu, 25 Jun 2020 17:09:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhLRednBFO4hvE6zWIqlstwUmvNLwh064wVb1ZuO9ucs6T0XnSe44TjtgtnWGXS4T9drJi X-Received: by 2002:a17:906:e0c7:: with SMTP id gl7mr277342ejb.264.1593130173164; Thu, 25 Jun 2020 17:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593130173; cv=none; d=google.com; s=arc-20160816; b=EWKgZIgPStknTvV1da35mkJuzUj0cRVl8cBMiOtQdtkzCH9S6iBTIT9/pKAQdhu5cQ owc/VgVF6zPoM0SyAxFPI2jreYESDIexE0eO4L2HyGe3wTdjHvhmx1j+pci0M4tEZwr0 EAT/cqVQasCH7ti/xr7icsalnJCQiAsX5o8V8rK2ufmGhUkMMBiOEPQkemf1Z+Clk4ih K1MvoJGpCRgzBZjm77M1hkHtBF5xzgGWSD4E++qFLv3+dMkRSG/UWlsGPyK/+DbIJCc2 dbKBAGGSC5ktfPgOnsScY+whiazN75Sy4D4EeqSofElVZvbHi4EhtwKfZzBob+xkuDUZ GJfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=c1FSAM48L1dsgylbDWy8T5pqUczgn7g93UlkZM0wT1w=; b=D1pJdS++8mnBHWtP9BERrRuSusFEenQTJ1nBQ/uht3+bCgC2GGsHtpeCePTHN+GIp/ xkRPvjCCdL2n4/xQPHOJbCw8Rftkasr0ehjI8S6yzHufZ2cBq7gzkQ2LSgcWhQkzv991 cX1gWkLwE/3JYmX+UzCHRT6hCGE/ewZ64CokS0cN0i1ByldiwV9lCH9LgTRdIFAXclL5 cbHuLfro12LZTwuKfyUSnBELYSEKpnU7bPnFir1GCdq9rf1EMBV5jA0R6fYdd+EZVXdz oAyZOPy/ZILnXseJB70+A9W7oqPR+gW1AZ1aD7NqtlpbiqrR8aRdjq+HoJRzUY/EYsub 17Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H+OacQV4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr16si20122192ejc.320.2020.06.25.17.09.09; Thu, 25 Jun 2020 17:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H+OacQV4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbgFYXhf (ORCPT + 99 others); Thu, 25 Jun 2020 19:37:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:42162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgFYXhe (ORCPT ); Thu, 25 Jun 2020 19:37:34 -0400 Received: from tleilax.com (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 008652084D; Thu, 25 Jun 2020 23:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593128253; bh=XPRK0sq0Rv/u4HT/KZE++IRrJWscCGZFPdc0LLn7yJ4=; h=From:To:Cc:Subject:Date:From; b=H+OacQV4B6rSiPM6i7vxqwJNYLit5laXMLXIrKiutIqIgWiNcfJv9bDeME2SxDSKX 65gr6qKqOguPP+HBR0Uzve0q0x7aYJWyqjfYNWzteAR9EjK21EuJixh4hDk/uQtw8E lakz1y711WfQxXekCriyRE8M23FYwtBi85CUizZs= From: Jeff Layton To: mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ebiggers@kernel.org Subject: [PATCH v2] sync.2: syncfs() now returns errors if writeback fails Date: Thu, 25 Jun 2020 19:37:31 -0400 Message-Id: <20200625233731.61555-1-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) v2: update the NOTES verbiage according to Eric's suggestion diff --git a/man2/sync.2 b/man2/sync.2 index 7198f3311b05..61e994c5affc 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 when passed a bad file descriptor (EBADF). 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. .SH BUGS Before version 1.3.20 Linux did not wait for I/O to complete before returning. -- 2.26.2