On Sun, May 06, 2018 at 11:59:57AM -0400, Jeff Layton wrote:
From: Matthew Wilcox willy@infradead.org
The errseq_t infrastructure assumes that errors which occurred before the file descriptor was opened are of no interest to the application. This turns out to be a regression for some applications, notably Postgres.
Before errseq_t, a writeback error would be reported exactly once (as long as the inode remained in memory), so Postgres could open a file, call fsync() and find out whether there had been a writeback error on that file from another process.
This patch changes the errseq infrastructure to report errors to all file descriptors which are opened after the error occurred, but before it was reported to any file descriptor. This restores the user-visible behaviour.
[ jlayton: fix up conflicts in comments ]
Thanks! I was just getting to this conflict :-)
I agree this resolution is the best one for 4.14.x