Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp209202iob; Mon, 2 May 2022 17:16:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCdm9v5JQYbVZvWmWcGMPtIuAYFcU46v+6nbSi8EfzqQ+ICCQ784d0r6D0TNI+uxZw88pK X-Received: by 2002:a17:90a:d58b:b0:1cd:65dc:6a62 with SMTP id v11-20020a17090ad58b00b001cd65dc6a62mr1857765pju.89.1651536994775; Mon, 02 May 2022 17:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651536994; cv=none; d=google.com; s=arc-20160816; b=qT4MlN63d3dLtEn7KShyBQ1To7LhlICsXdQXej8nIjtvtRQMVb2QNMRNwv3hhj9FSm pKZ5+1YjdEcbeJDoU6LHz7Ptv0Ws+PAs9Im6OsEx6TYvP7iM5DE1nR2+pt9G3YpMQ0hv tvZTjZlXMbLMlFI8Wsbgq6UILK2SBe7fQNK9xqfZs5eoKCL9cRowlNcP8WeRFPqiARqK vIIE5QoKu6JCCOhTRAnjluZJSvCvvNq0G3V1L/zLUryWzdkY7OeYiW1TaHwOgNpaweY+ d8P91wa+LtTT05ONSM0QY1SZgToFRcpxZ3WMG+1hyp8k9+S9fM0BfuHeUwHqK6wX240d vgTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=HbQWCtBRxcfJAUKd02jWRBKGaLkl1/d/Wwh9A9Rh4q4=; b=UXK0cWPLQ73JD78JfVUVmkPQ1U3/XE5B4zfxNIgQwNwFsdck4+DB3JN24+2guZelMT pu3sRtXzHRkHfFmY516BbI2sgzS694WuVSfvi0MByly9fWi4oyaXRvI5w/078w6w7pI9 2tZsVqMo+4eYNkuEal7b8Dj5iHinjyXqIVIoert0mP+EDjiUsbWYD+n6g77al0wVKUWI TvoBzdpmEkqYYvmn4qBx4EYEgroPNNh71XM+CilFUcUjRVAGoKn3zoxUwLv7XfGer20K mc2xCeRtLqZo+4g26wU99qjDjZyJSSDQcVsV5i+xgFdeGYpfL46f5PdT9u0DryWa9hJl 6xhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=ITGa+iAl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d76-20020a621d4f000000b00505b033e35fsi14586895pfd.71.2022.05.02.17.16.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=ITGa+iAl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A38D726CD; Mon, 2 May 2022 17:14:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243352AbiEBQUy (ORCPT + 99 others); Mon, 2 May 2022 12:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386243AbiEBQUq (ORCPT ); Mon, 2 May 2022 12:20:46 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B0FDFAB for ; Mon, 2 May 2022 09:17:14 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id E5F3E6CCD; Mon, 2 May 2022 12:17:13 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org E5F3E6CCD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1651508233; bh=HbQWCtBRxcfJAUKd02jWRBKGaLkl1/d/Wwh9A9Rh4q4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ITGa+iAlUGE+BUMc7XRmzUx7DQycokkpwtsDOPtWRJ01LL1NGTioY6cdNwYRHiXK2 5Bi+MteluEXJNLJbGutquXhifMuunh+dRex3P+aNn465I3GrZz6XlrNVLn3rY1skAX kZeYNJt7bcZfJd+wh9DfZRo0Y3Na//nAD4ow0Ma8= Date: Mon, 2 May 2022 12:17:13 -0400 From: "J. Bruce Fields" To: Richard Weinberger Cc: linux-nfs@vger.kernel.org, david@sigma-star.at, luis.turcitu@appsbroker.com, david.young@appsbroker.com, david.oberhollenzer@sigma-star.at, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, steved@redhat.com, chris.chilvers@appsbroker.com Subject: Re: [PATCH 0/5] nfs-utils: Improving NFS re-exports Message-ID: <20220502161713.GI30550@fieldses.org> References: <20220502085045.13038-1-richard@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220502085045.13038-1-richard@nod.at> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, May 02, 2022 at 10:50:40AM +0200, Richard Weinberger wrote: > This is the first non-RFC iteration of the NFS re-export > improvement series for nfs-utils. > While the kernel side[0] didn't change at all and is still small, > the userspace side saw much more changes. > > The core idea is adding new export option: reeport= > Using reexport= it is possible to mark an export entry in the exports > file explicitly as NFS re-export and select a strategy how unique > identifiers should be provided. > Currently two strategies are supported, "auto-fsidnum" and > "predefined-fsidnum", both use a SQLite database as backend to keep > track of generated ids. > For a more detailed description see patch "exports: Implement new export option reexport=". > I choose SQLite because nfs-utils already uses it and using SQL ids can nicely > generated and maintained. It will also scale for large setups where the amount > of subvolumes is high. > > Beside of id generation this series also addresses the reboot problem. > If the re-exporting NFS server reboots, uncovered NFS subvolumes are not yet > mounted and file handles become stale. > Now mountd/exportd keeps track of uncovered subvolumes and makes sure they get > uncovered while nfsd starts. > > The whole set of features is currently opt-in via --enable-reexport. Can we remove that option before upstreaming? For testing purposes it may makes sense to be able to turn the new code on and off quickly. But for something we're really going to support, it's just another hurdle for users to jump through, and another case we probably won't remember to test. The export options themselves should be enough configuration. Anyway, basically sounds reasonable to me. I'll try to give it a proper review sometime, feel free to bug me if I don't get to it in a week or so. --b. > I'm also not sure about the rearrangement of the reexport code, > currently it is a helper library. > > A typical export entry on a re-exporting server looks like: > /nfs *(rw,no_root_squash,no_subtree_check,crossmnt,reexport=auto-fsidnum) > reexport=auto-fsidnum will automatically assign an fsid= to /nfs and all > uncovered subvolumes. > > Richard Weinberger (5): > Implement reexport helper library > exports: Implement new export option reexport= > export: Implement logic behind reexport= > export: Avoid fsid= conflicts > reexport: Make state database location configurable > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/rw/misc.git/log/?h=nfs_reexport_clean > > configure.ac | 12 ++ > nfs.conf | 3 + > support/Makefile.am | 4 + > support/export/Makefile.am | 2 + > support/export/cache.c | 71 ++++++- > support/export/export.c | 27 ++- > support/include/nfslib.h | 1 + > support/nfs/Makefile.am | 1 + > support/nfs/exports.c | 68 +++++++ > support/reexport/Makefile.am | 6 + > support/reexport/reexport.c | 354 +++++++++++++++++++++++++++++++++ > support/reexport/reexport.h | 39 ++++ > systemd/Makefile.am | 4 + > systemd/nfs-server-generator.c | 14 +- > systemd/nfs.conf.man | 6 + > utils/exportd/Makefile.am | 8 +- > utils/exportd/exportd.c | 5 + > utils/exportfs/Makefile.am | 6 + > utils/exportfs/exportfs.c | 21 +- > utils/exportfs/exports.man | 31 +++ > utils/mount/Makefile.am | 7 + > utils/mountd/Makefile.am | 6 + > utils/mountd/mountd.c | 1 + > utils/mountd/svc_run.c | 6 + > 24 files changed, 690 insertions(+), 13 deletions(-) > create mode 100644 support/reexport/Makefile.am > create mode 100644 support/reexport/reexport.c > create mode 100644 support/reexport/reexport.h > > -- > 2.31.1