Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4178864pxj; Mon, 21 Jun 2021 15:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeOK5/1WMx36GD0xn7+I53jgb8j30eKVh3tQnp7ciI3lT0wJNWc7ssTIQBgBlygllVTzbB X-Received: by 2002:a05:6602:2bfa:: with SMTP id d26mr279605ioy.13.1624315355570; Mon, 21 Jun 2021 15:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624315355; cv=none; d=google.com; s=arc-20160816; b=ilZnTsCLNJd77Mzob3Z2SCo5lP1kKJ0UFozbvdG+n6nyKqxFKn0VifEGoIjmWQoMl0 C0A1DmoSrHCZBoL+z25XHxZQAFs2sosQadXyoRJna2YmfxrX8J662RK3CMrvAbRIQkhc albmIPjsnxGduUIhrNcwQjFVigLlAwASd5VdyTIqGbGgdnfBFrSFwd57jgae8UEWharA cgAmtIg/PXpPcp77Qg1p91CKdeoub9dBmi/q7VPDqnIPT9zZBoYx3tKz+/teISHxEVWV R+y7HGf9hShNEJx7P8Z8EY3SKlVHmBkuYE4e9ucvCxVqy7UkDM+Rh0AG5YANDsQxpmAS 8wMg== 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 :message-id:references:in-reply-to:cc:subject:to:from:date; bh=vrCQJULxBfGgORB465K9KmCaDs8jWL7pKrE+n+dJrQc=; b=gmAXZO38L3/I6Jupedj/hzKll2FGve8V7ptzKEeZq5TzWehWDVmpRCIa4WvxQEGIWb NlTq5exgZcaHOp0lUKZcA6EeBRvMUuPqRpGgwmLQnswwBFR6riUhPXgahYSrQBynQeHT AwoVlsg9Ob3Nwgkr2OvMTzqoiRrP7Z8c3JWqqzqoZ0nHg6plhY5t/uAmpy6PkV+am5Gk 22QN7jX0ql9YkgGcdCjt8XdWf9DSaB6gtcv8UM10zqFFwWqsgFU7QN3JKUuKG9QJ6a4W uYgIGfisd1fA1rIRciJJjOnCo/jy8EycNZ+tM7hwoJSIDyVyMxvN7K9ufACbeSyYrL5R Ft9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 c15si12854968ilo.97.2021.06.21.15.42.14; Mon, 21 Jun 2021 15:42:35 -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; 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 S231817AbhFUWoP (ORCPT + 99 others); Mon, 21 Jun 2021 18:44:15 -0400 Received: from out20-73.mail.aliyun.com ([115.124.20.73]:53042 "EHLO out20-73.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231997AbhFUWoP (ORCPT ); Mon, 21 Jun 2021 18:44:15 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1716254|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_social|0.153505-0.00121214-0.845283;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047190;MF=wangyugui@e16-tech.com;NM=1;PH=DS;RN=3;RT=3;SR=0;TI=SMTPD_---.KVuc6qQ_1624315318; Received: from 192.168.2.112(mailfrom:wangyugui@e16-tech.com fp:SMTPD_---.KVuc6qQ_1624315318) by smtp.aliyun-inc.com(10.147.44.129); Tue, 22 Jun 2021 06:41:58 +0800 Date: Tue, 22 Jun 2021 06:41:58 +0800 From: Wang Yugui To: "Frank Filz" Subject: Re: any idea about auto export multiple btrfs snapshots? Cc: "'NeilBrown'" , In-Reply-To: <001901d766c5$cf427af0$6dc770d0$@mindspring.com> References: <20210621225541.3CEB.409509F4@e16-tech.com> <001901d766c5$cf427af0$6dc770d0$@mindspring.com> Message-Id: <20210622064158.98CA.409509F4@e16-tech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.75.04 [en] Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi, > > OK thanks for the information. I think they will just work in nfs-ganesha as > long as the snapshots or subvols are mounted within an nfs-ganesha export or > are exported explicitly. nfs-ganesha has the equivalent of knfsd's > nohide/crossmnt options and when nfs-ganesha detects crossing a filesystem > boundary will lookup the filesystem via getmntend and listing btrfs subvols > and then expose that filesystem (via the fsid attribute) to the clients > where at least the Linux nfs client will detect a filesystem boundary and > create a new mount entry for it. Not only exported explicitly, but also kept in the same hierarchy. If we export /mnt/test #the btrfs /mnt/test/sub1 # the btrfs subvol 1 /mnt/test/sub2 # the btrfs subvol 2 we need to make sure we will not access '/mnt/test/sub1' through '/mnt/test' from nfs client. current safe export: #/mnt/test #the btrfs, not exported /mnt/test/sub1 # the btrfs subvol 1 /mnt/test/sub2 # the btrfs subvol 2 Best Regards Wang Yugui (wangyugui@e16-tech.com) 2021/06/22