Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp657313pxb; Thu, 17 Feb 2022 11:47:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJys+W5imsu3yZvUmA7a+N1E775UGJ2dSykyQdw9O9vbMGBQ7HLWB1vRL4om4TziGiy+nDLL X-Received: by 2002:a17:902:b597:b0:14f:3396:a7a5 with SMTP id a23-20020a170902b59700b0014f3396a7a5mr4190823pls.29.1645127254509; Thu, 17 Feb 2022 11:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645127254; cv=none; d=google.com; s=arc-20160816; b=vH1ulp6m4FqDzT/pvN3zGg1+ulE5SoiqPNQqrsfO0IoSVI6cPwnKCq24aJxb6jUqKJ vzDrwQ9MgSnVHWO/RuCNQmg+mo45p1Q0i8kKHbH2yiJOdrwhRq0tI3P0hBEXxm+nkLiT dPEWxlFm5osI9XYEs4Ctln7p4Cz6giTXfEegvowcoADGY/d3dEIeriYXjsszxRE+omi2 38xL9BW/EGJT8bp3+jUyiezgBr7IKB2WZAholNRMIVcmkPfxR4u2WNizZizGURiOlUzg ldPVAngICM/EpBJb+26hKEdj9rXyglbCtDZo5chm31gT7HhyDb1qhqjFlCbqVRufl79t UNVw== 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; bh=suS1aQ7PWa3XPb0EyEVNu5YyGSbvQZkeh4iF8jRjKds=; b=NycnJEEhOqCTqD5QZbAci5qheWBf4i5e5jiDbkV+pnuOA6kQ7Y+22zFkKmFZ4BwWFf wrx8Y7+PNMQ/1+HbjJJRMZDKTxDxxVv4jX11bAE1SQw4gi2Lr+AZBQ6sTNHHwy20rb/n T9OQuRYxLb3qJxlMAdFcNxBa/GHJH8XnkPP8/ePfRP/0mk+wnixOnHnWlwzlpdcD9KuR mjQx3bOCdgtvzTcMV2qsVBQI5iPAZdMy87dmw79SeFTDYPFrW/QksTmeX4IaEB4FscUs fyM0DA7446z8Y91Dr1BIB78DKNr2pBJ3c5fSupyE2noDZj3px+ixpRth4mZ82E6wM3Dx CYaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7si23671176plc.206.2022.02.17.11.47.15; Thu, 17 Feb 2022 11:47:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240881AbiBQNXK (ORCPT + 99 others); Thu, 17 Feb 2022 08:23:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240666AbiBQNXJ (ORCPT ); Thu, 17 Feb 2022 08:23:09 -0500 X-Greylist: delayed 370 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 17 Feb 2022 05:22:53 PST Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA26B996AE for ; Thu, 17 Feb 2022 05:22:52 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id E69A160F6B69; Thu, 17 Feb 2022 14:16:40 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lk-DzrSJFwxk; Thu, 17 Feb 2022 14:16:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0D132608A38A; Thu, 17 Feb 2022 14:16:40 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id V0GTcbLbDGXO; Thu, 17 Feb 2022 14:16:39 +0100 (CET) Received: from blindfold.corp.sigma-star.at (213-47-184-186.cable.dynamic.surfer.at [213.47.184.186]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 71E23605DED6; Thu, 17 Feb 2022 14:16:39 +0100 (CET) From: Richard Weinberger To: linux-nfs@vger.kernel.org Cc: david@sigma-star.at, bfields@fieldses.org, luis.turcitu@appsbroker.com, david.young@appsbroker.com, david.oberhollenzer@sigma-star.at, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, chris.chilvers@appsbroker.com, Richard Weinberger Subject: [RFC PATCH 4/6] export: Record mounted volumes Date: Thu, 17 Feb 2022 14:15:29 +0100 Message-Id: <20220217131531.2890-5-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220217131531.2890-1-richard@nod.at> References: <20220217131531.2890-1-richard@nod.at> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org As soon a client mounts a volume, record it in the database to be able to uncover NFS subvolumes after a reboot. Signed-off-by: Richard Weinberger --- support/export/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/export/cache.c b/support/export/cache.c index 6039745e..b5763b1d 100644 --- a/support/export/cache.c +++ b/support/export/cache.c @@ -967,8 +967,10 @@ static void nfsd_fh(int f) * line. */ qword_addint(&bp, &blen, 0x7fffffff); - if (found) + if (found) { + reexpdb_add_subvolume(found_path); qword_add(&bp, &blen, found_path); + } qword_addeol(&bp, &blen); if (blen <=3D 0 || cache_write(f, buf, bp - buf) !=3D bp - buf) xlog(L_ERROR, "nfsd_fh: error writing reply"); --=20 2.31.1