From: NeilBrown <neilb@suse.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] mount: take history into account when assessing if an error is permanent.
Date: Fri, 02 Dec 2016 09:09:49 +1100 [thread overview]
Message-ID: <87mvgf713m.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <0ecc5408-5d21-5c0c-86fb-07cc804f3d4c@RedHat.com>
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
On Fri, Dec 02 2016, Steve Dickson wrote:
>> static int nfs_is_permanent_error(int error)
>> {
>> + static int prev_error;
>> + static int rpt_cnt;
>> +
>> + if (error == prev_error)
>> + rpt_cnt += 1;
>> + else
>> + rpt_cnt = 1;
>> + prev_error = error;
>> +
>> switch (error) {
>> case ESTALE:
>> - case ETIMEDOUT:
>> + case EOPNOTSUPP: /* aka RPC_PROGNOTREGISTERED */
>> + /* If two in a row, assume permanent */
>> + return rpt_cnt >= 3;
> This looks good... very clean... and now the time
> out is control by the -o retry setting... Perfect!
>
>> case ECONNREFUSED:
>> + return rpt_cnt >= 5;
> My only question is why mess with this? Over the years
> we've always time out after 2 mins (the default) and now
> we are bring that down to 15 secs? I'm think that might
> be a bit short... I seems like we might be fixing something
> that is not broken...
Because it seemed like the "right" thing to do. ECONNREFUSED should be
a "permanent" error, except during a small window when the server is
booting.
But following the principle "if it ain't broke, don't fix it", I guess
it should stay as a "temporary" error. I'll resend.
>
> But again the design is very clever... nice work!
Thanks!
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2016-12-01 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 0:53 [PATCH 0/2] Revise handling of some mount errors NeilBrown
2016-11-30 0:53 ` [PATCH 1/2] mount: don't hide temporary error code on timeout NeilBrown
2016-11-30 0:53 ` [PATCH 2/2] mount: take history into account when assessing if an error is permanent NeilBrown
2016-12-01 19:36 ` Steve Dickson
2016-12-01 22:09 ` NeilBrown [this message]
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=87mvgf713m.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=SteveD@redhat.com \
--cc=linux-nfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).