[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180412212432.GE18364@bombadil.infradead.org>
Date: Thu, 12 Apr 2018 14:24:32 -0700
From: Matthew Wilcox <willy@...radead.org>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: Andres Freund <andres@...razel.de>,
Dave Chinner <david@...morbit.com>,
Jeff Layton <jlayton@...hat.com>,
Andreas Dilger <adilger@...ger.ca>,
20180410184356.GD3563@...nk.org,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
"Joshua D. Drake" <jd@...mandprompt.com>
Subject: Re: fsync() errors is unsafe and risks data loss
On Thu, Apr 12, 2018 at 05:21:44PM -0400, Theodore Y. Ts'o wrote:
> On Thu, Apr 12, 2018 at 01:28:30PM -0700, Matthew Wilcox wrote:
> > On Thu, Apr 12, 2018 at 01:13:22PM -0700, Andres Freund wrote:
> > > I think a per-file or even per-blockdev/fs error state that'd be
> > > returned by fsync() would be more than sufficient.
> >
> > Ah; this was my suggestion to Jeff on IRC. That we add a per-superblock
> > wb_err and then allow syncfs() to return it. So you'd open an fd on
> > a directory (for example), and call syncfs() which would return -EIO
> > or -ENOSPC if either of those conditions had occurred since you opened
> > the fd.
>
> When or how would the per-superblock wb_err flag get cleared?
That's not how errseq works, Ted ;-)
> Would all subsequent fsync() calls on that file system now return EIO?
> Or would only all subsequent syncfs() calls return EIO?
Only ones which occur after the last sampling get reported through this
particular file descriptor.
Powered by blists - more mailing lists