Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp588231rdg; Tue, 10 Oct 2023 22:16:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAcp0I0vMknU8V2u3pKvKdv8yMFBJHlkh6RMwFOgThtvow6fzY55wPJMW4FRx3hDWn9Yeq X-Received: by 2002:a05:6a00:21c5:b0:692:af9c:d96a with SMTP id t5-20020a056a0021c500b00692af9cd96amr18883024pfj.5.1697001378458; Tue, 10 Oct 2023 22:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697001378; cv=none; d=google.com; s=arc-20160816; b=tmhsWEdxFyxZo3iS9arLsT7QHs3enlCthfpEK7vdVXZrp/FVlO1CeiKG4pknYaLCdv hP4+IwxMqpW2kD2ad66MR6kJZeMQnmovReWqBu+nX47ds7bOUllZvNkLx2ePcz43ehgn OGiaFY1qwNlnMEgnGj/ryaNotIIHXBhFKyYVaa/ra83PALZ+2o+XSOoHsPMG2/WQidRb sxaUGEWn6DDqd9HYawehL07G0pNDxLHZiLv9jAz1YnRay0TxJaV87RzGPY45ZW/Tv+1O rxEechYfsilGjAeY7a3oK3PRpREVKnI2TUAIIMJrsvRmEutDDbYeQnGngg8SheOCULnk LDxQ== 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=h98sz0lTI/sP+BC22XaGvvxMxAkk0s2cI0+X8eHPRIw=; fh=a34eu72gbxH/s+HaSzGGNYvG7vjnazyS57/a3xcYRNU=; b=WKCtXjgGZdWmEORVUy3Y3XEA78/21Ln3rZb6xBz33jjalb8jPbVV7xJyKl+pxwT0z+ m1r+FuimFQXjFWAzgLtisIVHkBn7IZ2TXaNuZr0b5yYoxaBCX+ZrTJ9xZ2I+xGgHmXdJ BPaq0zuv9XaBjYJYG2HUFt93bsJm2giXtBc9GcFOXlgVgthw5NrGADpwdfdx0/nE4Dyz ATG3OaY38m1goLzx1vfai141PfPByvZumeawws2FFlQ/w7KUZ7T1gTLqJDo81w/P+Ri+ 7bABunl0fzqVi87bc/U+eU5AfZMGuJQSYodWiNS59p61G1FjSbnXvqmki5A5al34bsiu 64eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=0m4oMdFx; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=bkFcE2dK; 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 ch7-20020a056a00288700b006901a8f5dadsi709462pfb.289.2023.10.10.22.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 22:16:18 -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=0m4oMdFx; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=bkFcE2dK; 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 3C4358025B49; Tue, 10 Oct 2023 22:16:16 -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 S229686AbjJKFQP (ORCPT + 99 others); Wed, 11 Oct 2023 01:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbjJKFQO (ORCPT ); Wed, 11 Oct 2023 01:16:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D414D94 for ; Tue, 10 Oct 2023 22:16:11 -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-out1.suse.de (Postfix) with ESMTPS id 9330921847; Wed, 11 Oct 2023 05:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1697001370; 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=h98sz0lTI/sP+BC22XaGvvxMxAkk0s2cI0+X8eHPRIw=; b=0m4oMdFxfIxGkJ/kkRLB5GemvkrPaSZKmGsXumVgwcWp+cX5lsrlbS1QweRBx40TZYQLlO 8aP9d9pndT97lFMOWEP0ifMdVU6oqcsouieEGlTw3z7AOJc7DaYkmttzxe+0/V6XYhWmxE s2LNp8VeQ/6li0JDTDIH8+Y8QiC3mdM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1697001370; 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=h98sz0lTI/sP+BC22XaGvvxMxAkk0s2cI0+X8eHPRIw=; b=bkFcE2dKLEvvVbhq2ei8nF8LdQfFpBwb63NxHsFOT7jWyWI12rtemDrf73yasLyzmPUReD xDRY27n3zCaBRWAA== 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 5540713586; Wed, 11 Oct 2023 05:16:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Nw+dApkvJmVzQgAAMHmgww (envelope-from ); Wed, 11 Oct 2023 05:16:09 +0000 From: NeilBrown To: Steve Dickson Cc: linux-nfs@vger.kernel.org, Trond Myklebust Subject: [PATCH 1/3] export: fix handling of error from match_fsid() Date: Wed, 11 Oct 2023 15:58:00 +1100 Message-ID: <20231011051131.24667-2-neilb@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011051131.24667-1-neilb@suse.de> References: <20231011051131.24667-1-neilb@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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]); Tue, 10 Oct 2023 22:16:16 -0700 (PDT) X-Spam-Level: ** 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 is no other path matched the fsid, which is what we want. The current code results in nothing being exported and any export point, or any mount point beneath a crossmnt export point fail 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