Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp88991pxj; Wed, 23 Jun 2021 16:29:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZpMp1r55X9SyD2eOkR3Si8zjFb/B3yg8EdfLLqcKF6usBVyG8I0yaib0h0y+RZReS5Spu X-Received: by 2002:a05:6402:27d0:: with SMTP id c16mr2906031ede.60.1624490985944; Wed, 23 Jun 2021 16:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624490985; cv=none; d=google.com; s=arc-20160816; b=WramYJD5EJ+6iNezo9l1pChzZ825DNuIo67TFJW1sgapbucKmy5XZNJzRUIboNKqUT DVbcKtBHT7wXm7LTYQa/oXlKQpWVDNDOOOATsqgsemZB0VgfVcAxoF5OUgS8l6nBLzJY UperY4tlhV98norW6xzp8lOvP7Sr1mDGjtx+BuSxTqUAUXPvzrfmqMOTw+YrAMJg/2wt u+/PZBj6L3AXjcqIbYPGShOwdgO75u/JgGahcjcnVFKEwJfU1T1kf/zBoRcGk2vT+d5+ tTRS8QXSd7lbW8eKG7wJ/hlg1S76rSVjZJQb2rXZHIEiVkhUqUMG3CZ0+Yn9D87y5dIy mq9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=3TDk4MJHAr8cX9w59gaSzhS7by5hlWpd6ewiFXFe3OU=; b=zPd/+RHFMlgM5frbGfVxb6kjYSEY8KYTtfJM0z9H2fG2S0HvmFCFgO3m3Mbw4mo7cH ocpxctsyFZBz75M15Db7+q6iOz0KWCbpTi8VImhCktx15azDwADKuUplctA0moKPLS+L UDfZ8U53tiMaNMeio2MIh+J35PNDRMq2lMqb0tE+VLrAePRItQGFwx49D0++HXCBhDoq tRsnuXnysYcqF33+ySLfDWXW527Wz5sMc0u/bBr39RjLOrzGuJCHjNJAWZNofREswKoX 09NGpA4KcBmYJcWr+8xVnrgtI36/udgNLrCA6sIPOVfg4krso+qlggDyXrHticGVL/yN Avag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Pk8WijZB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Pk8WijZB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="mnd/pdj/"; 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 be8si1102786edb.21.2021.06.23.16.29.12; Wed, 23 Jun 2021 16:29:45 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Pk8WijZB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Pk8WijZB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="mnd/pdj/"; 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 S229755AbhFWXb0 (ORCPT + 99 others); Wed, 23 Jun 2021 19:31:26 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:39866 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhFWXb0 (ORCPT ); Wed, 23 Jun 2021 19:31:26 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3840C2196A; Wed, 23 Jun 2021 23:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624490947; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TDk4MJHAr8cX9w59gaSzhS7by5hlWpd6ewiFXFe3OU=; b=Pk8WijZBqqWaJnmQ8J9fp/1w3wYapyU0cBpcd8ooFnSD2qviSNADPWvozy4+CgDNDlWSWB xst5Crsm9ZGrIkM0pFzb2Qi7QX9kqHae+HArBeF0JvmW/MHI6S0wEi5lb3Uq6M5zaPCz1K qvsnXg1TbL+EWbcxWYU+L9fxJRQYS9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624490947; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TDk4MJHAr8cX9w59gaSzhS7by5hlWpd6ewiFXFe3OU=; b=mnd/pdj//Z91IxGE2hsQFVqpfs/wLt23dT7FT7Xv6xllqfzalCIoPwUTy47zMXZZ/fovMK 5uoX1Uo5UsMSsACg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id DFBDC11A97; Wed, 23 Jun 2021 23:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624490947; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TDk4MJHAr8cX9w59gaSzhS7by5hlWpd6ewiFXFe3OU=; b=Pk8WijZBqqWaJnmQ8J9fp/1w3wYapyU0cBpcd8ooFnSD2qviSNADPWvozy4+CgDNDlWSWB xst5Crsm9ZGrIkM0pFzb2Qi7QX9kqHae+HArBeF0JvmW/MHI6S0wEi5lb3Uq6M5zaPCz1K qvsnXg1TbL+EWbcxWYU+L9fxJRQYS9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624490947; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3TDk4MJHAr8cX9w59gaSzhS7by5hlWpd6ewiFXFe3OU=; b=mnd/pdj//Z91IxGE2hsQFVqpfs/wLt23dT7FT7Xv6xllqfzalCIoPwUTy47zMXZZ/fovMK 5uoX1Uo5UsMSsACg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id g3mxI8HD02DWUQAALh3uQQ (envelope-from ); Wed, 23 Jun 2021 23:29:05 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "J. Bruce Fields" Cc: "Wang Yugui" , linux-nfs@vger.kernel.org Subject: Re: any idea about auto export multiple btrfs snapshots? In-reply-to: <20210623222559.GI20232@fieldses.org> References: <162432531379.17441.15110145423567943074@noble.neil.brown.name>, <20210622112253.DAEE.409509F4@e16-tech.com>, <20210622151407.C002.409509F4@e16-tech.com>, <162440994038.28671.7338874000115610814@noble.neil.brown.name>, <20210623153548.GF20232@fieldses.org>, <162448589701.28671.8402117125966499268@noble.neil.brown.name>, <20210623222559.GI20232@fieldses.org> Date: Thu, 24 Jun 2021 09:29:01 +1000 Message-id: <162449094105.28671.17150162627927917482@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, 24 Jun 2021, J. Bruce Fields wrote: > On Thu, Jun 24, 2021 at 08:04:57AM +1000, NeilBrown wrote: > > On Thu, 24 Jun 2021, J. Bruce Fields wrote: > > One other thing I'm not sure about: how do cold cache lookups of > filehandles for (possibly not-yet-mounted) subvolumes work? Ahhhh... that's a good point. Filehandle lookup depends on the target filesystem being mounted. NFS exporting filesystems which are auto-mounted on demand would be ... interesting. That argues in favour of nfsd treating a btrfs filesystem as a single filesystem and gaining some knowledge about different subvolumes within a filesystem. This has implications for NFS re-export. If a filehandle is received for an NFS filesystem that needs to be automounted, I expect it would fail. Or do we want to introduce a third level in the filehandle: filesystem, subvol, inode. So just the "filesystem" is used to look things up in /proc/mounts, but "filesystem+subvol" is used to determine the fsid. Maybe another way to state this is that the filesystem could identify a number of bytes from the fs-local part of the filehandle that should be mixed in to the fsid. That might be a reasonably clean interface. > > > All we really need is: > > 1/ someone to write the code > > 2/ someone to review the code > > 3/ someone to accept the code > > Hah. Still, the special exceptions for btrfs seem to be accumulating. > I wonder if that's happening outside nfs as well. I have some colleagues who work on btrfs and based on my occasional discussions, I think that: yes, btrfs is a bit "special". There are a number of corner-cases where it doesn't quite behave how one would hope. This is probably inevitable given they way it is pushing the boundaries of functionality. It can be a challenge to determine if that "hope" is actually reasonable, and to figure out a good solution that meets the need cleanly without imposing performance burdens elsewhere. NeilBrown