POSIX violation by writeback error

焦晓冬
2018-09-04T06:32:41Z

Hi,

After reading several writeback error handling articles from LWN, I
begin to be upset about writeback error handling.

Jlayton's patch is simple but wonderful idea towards correct error
reporting. It seems one crucial thing is still here to be fixed. Does
anyone have some idea?

The crucial thing may be that a read() after a successful
open()-write()-close() may return old data.

That may happen where an async writeback error occurs after close()
and the inode/mapping get evicted before read().

That violate POSIX as POSIX requires that a read() that can be proved
to occur after a write() has returned will return the new data.

Regards,

Trol