Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp963959rda; Sun, 22 Oct 2023 19:11:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNNcrVJiq7pe8nqcMHXvEkA+z8bSt3ynatIjCFpgFvZSc4Q2Y3tSu4qhk9NTJiQ6m57/co X-Received: by 2002:a17:90a:53c5:b0:27d:8d0:713e with SMTP id y63-20020a17090a53c500b0027d08d0713emr8297771pjh.10.1698027109640; Sun, 22 Oct 2023 19:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698027109; cv=none; d=google.com; s=arc-20160816; b=lAuQE59ulX1rdI/OFDyKLD/HmmYpg7AGYUcE1Z+EGt5RhSqV/HM6jr2M+6W7OA6wAC UZ5w5lDFeCSVGoCqgY+4uuKUZHNYPRduvEQCEIXlMSmj4pz7b8XFjT2W5iKBTvn+d3nL X2MSOMnQgH18Pc2Oeaq/0cvxrNijewe7dPUr2gzOzg1o8cNBD1HMVz67YQh/S7P/GMP6 4z1bq1l/LDDHm5ywl/VME0abz41B0IIt9YxLl+RtDF50b3VE5slwLKyDrIQ+y2cdiitq +HVs7oaz5Duklr3TXfZbyCEMigZYV7rqbzJtAQNqFHk/MW1Eqz0JCZ75l8EccXFETBNT JBLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=wp0WlWrHsij9v1ELwAOMtktOa0wyT2s2v9GtDArTVP8=; fh=7qEnEX/LkcfVW+x9QL9Kl5KXgIktTChUzdd7gz02GxQ=; b=j+jR0DyJ8vQonpDc/qvLW9WXY0CtxOqJHPoSncMFxx/7+lotBM53BFPqYTe1Zq6jAS 9G3gMvJsbkXe4vDMMOJgGMNvY292uxs/DHcvdTprDhZFuFplSq8ySkaFzaE3okInLQuu Lpv+cZV/jNY62Q8/Qcsh17lAb7y0kMtu5Dquy3rMNjrq5+NH/rbe8KzAiI9Q3VwalK/M BTkzSnc69SpL21QC5iLPyVC5Sh9Up6IeV7iWAFnpRRMfcDFJoQ/3NbdECd9sdiweKTPQ tt+HGzRE4Pmqd38YYuimNKR/13KixSkud5qkVe+Uwq0YyM0bqjIg7rTVE4ugp4rp6JT1 EBpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tRzQYpmk; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id mh1-20020a17090b4ac100b002680abc3699si8671270pjb.115.2023.10.22.19.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 19:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tRzQYpmk; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5AE08806B9E5; Sun, 22 Oct 2023 19:11:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233046AbjJWCLp (ORCPT + 99 others); Sun, 22 Oct 2023 22:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjJWCLo (ORCPT ); Sun, 22 Oct 2023 22:11:44 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6032490 for ; Sun, 22 Oct 2023 19:11:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0DD7E1FE03; Mon, 23 Oct 2023 02:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1698027101; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wp0WlWrHsij9v1ELwAOMtktOa0wyT2s2v9GtDArTVP8=; b=tRzQYpmkqRky2iLdpRQRafeL0vw6T7w4MZ0BrNA41vsptrowCs2PwrE0/lXSARc8p4mtax 86hI09OpWhtre2UwDq3tl2Q4a0o1NVJbbCBdvVinFkaPDG45ncEVnooo/eiw58hZzyY0R8 93APs1kjT0OUemI0P4+GuGqYymnBLe4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1698027101; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wp0WlWrHsij9v1ELwAOMtktOa0wyT2s2v9GtDArTVP8=; b=yyiBD8YPpZBz6SUWp1FV1Y3THe+YmuMrENDjgA9BUk5d56HMo/5OKs1RDPMM9h8SX4/4w6 IoqCBfHAvLXk9zBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D5638132FD; Mon, 23 Oct 2023 02:11:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5UARI1vWNWVlbwAAMHmgww (envelope-from ); Mon, 23 Oct 2023 02:11:39 +0000 From: NeilBrown To: Steve Dickson Cc: linux-nfs@vger.kernel.org, Trond Myklebust Subject: [PATCH 1/6] export: fix handling of error from match_fsid() Date: Mon, 23 Oct 2023 12:58:31 +1100 Message-ID: <20231023021052.5258-2-neilb@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023021052.5258-1-neilb@suse.de> References: <20231023021052.5258-1-neilb@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: 0.79 X-Spamd-Result: default: False [0.79 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.11)[66.16%] X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 22 Oct 2023 19:11:47 -0700 (PDT) If match_fsid() returns -1 we shouldn't assume that the path definitely doesn't match the fsid, though it might not. This is a similar situation to where an export is expected to be a mount point, but is found not to be one. So it can be handled the same way, by setting 'dev_missing'. This will only have an effect if no other path matched the fsid, which is what we want. The current code results in nothing being exported if any export point, or any mount point beneath a crossmnt export point, fails a 'stat' request, which is too harsh. Signed-off-by: NeilBrown --- support/export/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/export/cache.c b/support/export/cache.c index 19bbba556060..e4595020f43f 100644 --- a/support/export/cache.c +++ b/support/export/cache.c @@ -858,7 +858,8 @@ static void nfsd_fh(int f) case 0: continue; case -1: - goto out; + dev_missing ++; + continue; } if (is_ipaddr_client(dom) && !ipaddr_client_matches(exp, ai)) -- 2.42.0