Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1227941pxk; Thu, 10 Sep 2020 10:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYHiHCJueVrm8nSUpZpcL1zP+rD04UJ1Wp/x2wB3VgCao0n97mSzZcP6uYY57T1jmFznt6 X-Received: by 2002:a17:906:5495:: with SMTP id r21mr9487158ejo.33.1599757431843; Thu, 10 Sep 2020 10:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599757431; cv=none; d=google.com; s=arc-20160816; b=inQa8rUZAjcSiZOF6MYXNdBg8LporDJawl0gtQgZgWrLyQanJmu0GcsD+SvWrN+A76 5/oZ+xpQX5/GOwqk+xPwzINRAL+GOK4IbxijAKkoGkWZZqK9Qh2PwLUJbbZKjqN6X+v0 iKeII9+CN1quagKrs2U24b66SueceB9pCnzpB39XiGBCsqYX+EKsmmQZeLJf8T1P0ZKL rmK51vVhcwgy60fp3BRL/O1xrqRIZY5hSIF3JvMjY3Zihs7zwWQkN/nRNknBaiq/0rNp mn93xXpMAONSfrGr2QGoV5XTj0fHV+tQTJIVQIeW/4/KrFoL0vvYL1EnosQnT2bCIFRO /utA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:dkim-signature:dkim-filter; bh=GW4Ajm3bOYsTcOBYGzs2hPawP22nAScLadtVuQKq1Pc=; b=uhlZyaDkQBjyExjChRVyz/8XAxvsSCznZeLWHg8ip7t9TldDOazLc0q+6WhYe+FR9N A1exngAlQSz1tVixDBMgIgJE17R/SG8OjpY8V5dXBftKgHQ5dFpaSr7Pn58rNkJgJ7EU pscY/DzvAylSu+6DEz6yQr6Z+mqzqzwlv/od/r5/9J2esmAPQYG1smOD7KAoF4ZBian3 cxAhh3KOUCMqUtIcfGp2icLYlPMY6kuqF2Lt1mlii555gD1xIw3oWDrnn1GGwx6gd2Zd XJhJ/FTgflQwtIMngVQO1SDDRujTKZNmvj1m5YZpyGb77TMvj8pFCpJOtQMKD7HTgA4O mzEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=R0sj1+WI; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si3502897edb.37.2020.09.10.10.03.18; Thu, 10 Sep 2020 10:03:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=R0sj1+WI; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbgIJRCq (ORCPT + 99 others); Thu, 10 Sep 2020 13:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbgIJRCb (ORCPT ); Thu, 10 Sep 2020 13:02:31 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F1BBC061573 for ; Thu, 10 Sep 2020 10:02:26 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id E6D7C425E; Thu, 10 Sep 2020 13:02:20 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org E6D7C425E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1599757340; bh=GW4Ajm3bOYsTcOBYGzs2hPawP22nAScLadtVuQKq1Pc=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=R0sj1+WIb8cfhlJAUwDIezpu9ARnV81IiPORdOZpSBlG1+GjiEdM5x7ornyXUrL3E sjhLe1FWhMQ/S+5x2DTpU1TK0jJ8bhfeCOT+Sb/5DHZZWr7W1SCd4tBtl6ZePC2emc TuQyM/XXWUiLhC312IfRExSm+xhXYlcJz32+ITZs= Date: Thu, 10 Sep 2020 13:02:20 -0400 To: trondmy@kernel.org Cc: Steve Dickson , linux-nfs@vger.kernel.org Subject: Re: [PATCH] mountd: Ignore transient and non-fatal filesystem errors in nfsd_export Message-ID: <20200910170220.GB28793@fieldses.org> References: <20200908211958.38741-1-trondmy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908211958.38741-1-trondmy@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Sep 08, 2020 at 05:19:58PM -0400, trondmy@kernel.org wrote: > From: Trond Myklebust > > 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. What sort of transient errors? I guess this makes the upcall (and the original rpc) eventually time out? --b. > > Signed-off-by: Trond Myklebust > --- > 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" > -- > 2.26.2