summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-09-18 14:14:22 -0400
committerSteve Dickson <steved@redhat.com>2020-09-18 14:14:22 -0400
commitebb4ed65ed423ceaa7a5fa48f2bd79b9d1668754 (patch)
tree76e6b79084925d339d7aeecbb6e845837f79d992
parent482e72ba04bbeb703688d35486a252f2a2751771 (diff)
downloadnfs-utils-2-5-2-rc5.tar.gz
mountd: Ignore transient and non-fatal filesystem errors in nfsd_exportnfs-utils-2-5-2-rc5
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> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mountd/cache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index ea74067..a81e820 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"