Whamcloud - gitweb
libext2fs: call fsync(2) to clear stale errors for a new a unix I/O channel
authorTheodore Ts'o <tytso@mit.edu>
Wed, 4 Jul 2018 04:23:10 +0000 (00:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Jul 2018 04:23:10 +0000 (00:23 -0400)
commite8236b49d0fb056847da5fb95b2709e63e6be7c6
tree7cfe76792ac648c8c89497813faedbf4198ef6cd
parentd8cbb80348aac26c007f6d13eb879e080c9b01f4
libext2fs: call fsync(2) to clear stale errors for a new a unix I/O channel

Newer versions of Linux will retain errors and allow them to be
returned by fsync() or close(), even if the error happened before the
file descriptor was opened.  This was to accomodate Postgres's
"interesting" method of error collection.

Unfortunately, for e2fsck, we never want to see stale errors, as this
can cause xfstests (such generic/347) to fail with a false positive.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/unix_io.c