From: "chenxiaosong (A)" <chenxiaosong2@huawei.com>
To: Trond Myklebust <trondmy@hammerspace.com>,
"anna@kernel.org" <anna@kernel.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"liuyongqiang13@huawei.com" <liuyongqiang13@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"yi.zhang@huawei.com" <yi.zhang@huawei.com>,
"zhangxiaoxu5@huawei.com" <zhangxiaoxu5@huawei.com>
Subject: Re: [PATCH -next,v2] NFS: report and clear ENOSPC/EFBIG/EDQUOT writeback error on close() file
Date: Wed, 15 Jun 2022 09:34:31 +0800 [thread overview]
Message-ID: <d82be232-8df4-86ff-ade5-4b9864e9cf40@huawei.com> (raw)
In-Reply-To: <806ae30d4d53886e7d394cc9abb0b2045a314f01.camel@hammerspace.com>
在 2022/6/15 3:48, Trond Myklebust 写道:
> NACK. How many times do I have to repeat that we do NOT clear the error
> log in flush()?
>
close(2) manpage described:
> ENOSPC, EDQUOT: On NFS, these errors are not normally reported
> against the first write which exceeds the available storage space,
> but instead against a subsequent write(2), fsync(2), or close(2).
> A careful programmer will check the return value of close(), since
> it is quite possible that errors on a previous write(2) operation are
> reported only on the final close() that releases the open file
> description. Failing to check the return value when closing a file
> may lead to silent loss of data. This can especially be observed
> with NFS and with disk quota.
write(2) manpage described:
> Since Linux 4.13, errors from write-back come with a promise that they
> may be reported by subsequent. write(2) requests, and will be
> reported by a subsequent fsync(2) (whether or not they were also
> reported by write(2)).
Both close(2) and write(2) manpage described: report writeback error
(not clear error), especially the write(2) manpage described: will be
reported by a subsequent fsync(2) whether or not they were also reported
by write(2).
If ENOSPC/EFBIG/EDQUOT writeback error can be cleared on write(), maybe
it is better to be cleared on close() instead of saving the error for
next open().
next prev parent reply other threads:[~2022-06-15 1:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 15:28 [PATCH -next,v2] NFS: report and clear ENOSPC/EFBIG/EDQUOT writeback error on close() file ChenXiaoSong
2022-06-14 19:48 ` Trond Myklebust
2022-06-15 1:34 ` chenxiaosong (A) [this message]
2022-06-15 11:55 ` Trond Myklebust
2022-06-15 0:33 ` kernel test robot
2022-06-15 1:14 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d82be232-8df4-86ff-ade5-4b9864e9cf40@huawei.com \
--to=chenxiaosong2@huawei.com \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=liuyongqiang13@huawei.com \
--cc=trondmy@hammerspace.com \
--cc=yi.zhang@huawei.com \
--cc=zhangxiaoxu5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox