From: Andres Freund <andres@anarazel.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, Jeff Layton <jlayton@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Always report a writeback error once
Date: Mon, 23 Apr 2018 14:50:32 -0700 [thread overview]
Message-ID: <20180423215032.qfk3ktoadf4tofrq@alap3.anarazel.de> (raw)
In-Reply-To: <20180423214348.GH13383@bombadil.infradead.org>
On 2018-04-23 14:43:48 -0700, Matthew Wilcox wrote:
> On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote:
> > I've never really looked at this code in any depth before, but won't
> > this potentially lead to the same error being reported on multiple FDs?
> > Imagine two fds (potentially in different processes) getting the 0
> > returned by errseq_sample() because it's not ERRSEQ_SEEN. Afaict
> > file_check_and_advance_wb_err() will return an error that's always
> > unlike 0 in that case, and thus the error will returned on both fds?
> >
> > I'm personally perfectly fine with that, but it's not necessarily what's
> > described as desired in your email?.
>
> That's what I was trying to say with this paragraph:
>
> > > This patch restores that behaviour by reporting errors to file descriptors
> > > which are opened after the error occurred, but before it was reported
> > > to any file descriptor.
>
> Maybe it was a little unclear? I'd appreciate a suggestion on making
> it clearer.
I think I was thinking of the following paragraph from your commit
message:
> 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.
Note the "exactly once", making "that behaviour" in the following
paragraph potentially refer to exactly once:
> This patch restores that behaviour by reporting errors to file descriptors
> which are opened after the error occurred, but before it was reported
> to any file descriptor.
Just adding a sentence here saying something like "This means that the
error might be reported to more fds than before." or such would address
that potential ambiguity?
> I think this behaviour is perfectly justifiable.
I agree.
Greetings,
Andres Freund
next prev parent reply other threads:[~2018-04-23 21:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 20:42 Matthew Wilcox
2018-04-23 20:57 ` Andres Freund
2018-04-23 21:43 ` Matthew Wilcox
2018-04-23 21:50 ` Andres Freund [this message]
2018-04-23 21:51 ` Matthew Wilcox
2018-04-23 21:53 ` Andres Freund
2018-04-24 12:24 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423215032.qfk3ktoadf4tofrq@alap3.anarazel.de \
--to=andres@anarazel.de \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®