lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6d2fb44131b4ec713e81676f26ca7ba086af4ee4.camel@hammerspace.com>
Date:   Wed, 15 Jun 2022 11:55:08 +0000
From:   Trond Myklebust <trondmy@...merspace.com>
To:     "anna@...nel.org" <anna@...nel.org>,
        "chenxiaosong2@...wei.com" <chenxiaosong2@...wei.com>
CC:     "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "liuyongqiang13@...wei.com" <liuyongqiang13@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "yi.zhang@...wei.com" <yi.zhang@...wei.com>,
        "zhangxiaoxu5@...wei.com" <zhangxiaoxu5@...wei.com>
Subject: Re: [PATCH -next,v2] NFS: report and clear ENOSPC/EFBIG/EDQUOT
 writeback error on close() file

On Wed, 2022-06-15 at 09:34 +0800, chenxiaosong (A) wrote:
> 在 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().

We've already had this discussion. I'm not making any exceptions for
NFS to rules that apply to all filesystems.

If you want the rules to change, then you need to talk to the entire
filesystem community and get them to accept that the VFS level
implementation of error handling is incorrect.

That's my final word on this subject.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ