On Mon, 2020-12-28 at 20:48 +0000, Matthew Wilcox wrote: > On Mon, Dec 28, 2020 at 09:37:37PM +0200, Amir Goldstein wrote: > > Having said that, I never objected to the SEEN flag split. > > I STRONGLY object to the SEEN flag split. I think it is completely > unnecessary and nobody's shown me a use-case that changes my mind. I think the flag split makes better sense conceptually, though the existing callers don't really have a need for it. I have a use-case in mind that doesn't really involve overlayfs: We still have a lot of internal callers that ultimately call filemap_check_errors() to check and clear the mapping's AS_EIO/AS_ENOSPC flags. Splitting the SEEN flag in two could allow those callers to instead sample the errseq_t using errseq_peek for their own purposes, without clearing the REPORTED flag. That means that the existing semantics for seeing errors on newly opened files could be preserved while allowing internal callers to use errseq_t-based error handling. That said, I don't have any patches to do this right now. It's a fairly significant project to convert all of the existing callers of filemap_check_errors() to such a scheme wholesale. It could be done piecemeal though, and we could start discouraging new callers of filemap_check_errors and the like. -- Jeff Layton <jlayton@xxxxxxxxxx>