NACK. How many times do I have to repeat that we do NOT clear the error
log in flush()?
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.
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)).