From: Steve Dickson <SteveD@RedHat.com>
To: trondmy@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] mountd: Ignore transient and non-fatal filesystem errors in nfsd_export
Date: Fri, 18 Sep 2020 14:32:16 -0400 [thread overview]
Message-ID: <33492131-a396-9f6c-30bd-fac8de9c9e6d@RedHat.com> (raw)
In-Reply-To: <20200908211958.38741-1-trondmy@kernel.org>
On 9/8/20 5:19 PM, trondmy@kernel.org wrote:
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
>
> If the mount point check in nfsd_export fails due to a transient error,
> then ignore it to avoid spurious NFSERR_STALE errors being returned by
> knfsd.
>
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Committed... (tag: nfs-utils-2-5-2-rc5)
steved.
> ---
> utils/mountd/cache.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> index 6cba2883026f..93e868341d15 100644
> --- a/utils/mountd/cache.c
> +++ b/utils/mountd/cache.c
> @@ -1411,7 +1411,10 @@ static void nfsd_export(int f)
>
> if (mp && !*mp)
> mp = found->m_export.e_path;
> - if (mp && !is_mountpoint(mp))
> + errno = 0;
> + if (mp && !is_mountpoint(mp)) {
> + if (errno != 0 && !path_lookup_error(errno))
> + goto out;
> /* Exportpoint is not mounted, so tell kernel it is
> * not available.
> * This will cause it not to appear in the V4 Pseudo-root
> @@ -1420,9 +1423,12 @@ static void nfsd_export(int f)
> * And filehandle for this mountpoint from an earlier
> * mount will block in nfsd.fh lookup.
> */
> + xlog(L_WARNING,
> + "Cannot export path '%s': not a mountpoint",
> + path);
> dump_to_cache(f, buf, sizeof(buf), dom, path,
> NULL, 60);
> - else if (dump_to_cache(f, buf, sizeof(buf), dom, path,
> + } else if (dump_to_cache(f, buf, sizeof(buf), dom, path,
> &found->m_export, 0) < 0) {
> xlog(L_WARNING,
> "Cannot export %s, possibly unsupported filesystem"
>
prev parent reply other threads:[~2020-09-18 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 21:19 [PATCH] mountd: Ignore transient and non-fatal filesystem errors in nfsd_export trondmy
2020-09-10 17:02 ` J. Bruce Fields
2020-09-10 17:25 ` Trond Myklebust
2020-09-10 18:23 ` bfields
2020-09-18 18:32 ` Steve Dickson [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=33492131-a396-9f6c-30bd-fac8de9c9e6d@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@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