Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3465864pxj; Sun, 20 Jun 2021 22:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt7CpNLnrb3owuZhIUkXHADPJmj2bNeK9Ha/EtBwKYfK0kA96CccxB3e9L9b0Qg8MdERU6 X-Received: by 2002:a02:cba8:: with SMTP id v8mr1309996jap.111.1624252447999; Sun, 20 Jun 2021 22:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624252447; cv=none; d=google.com; s=arc-20160816; b=SVN09b0gzYQ+1n91Il5s7gO6swzS1f/O4i4R6QGqyGE/V+R1VgBDLSHOI1k8YE6k7x smw/ain5hiSgVofdvpeaBBScNk3D84cM62ecXnyshlaf5nKebF42F6a8ObLQLDEOzgGv 7rNsBhvunjkK50hfCn8r3u78I4VZxgfXP/ZrTtzmzgxM/kU4bG6i6o6dq95rcEciwZYA d157wjffzcwmQm919PEjWmWiMz/h0xgJTHA3jTW9sfl4ge+WWdKNwLM7JDXe05fvJ0kB CcOQuVc0tGuWjs6ts/2ypeAEGFWochA8dJl1lg9y3ymgAqR/6bQ35DyliOma/RxbfM+G Q5Hg== 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=OSm3BeKTVRHfNdji1+7Zgv6lEY28TkAM1A0d1NHpK8c=; b=iTlwJGz3VMtdiOE3SgOAsfHFMLc8aPF5haLTZa6JZxfG4yaX9M2eLasjzRdvtzYGEs gsT+t625s/9bJqAPsbdfRqaudT0JsvF3ATUFKPpCj9gKL0MaPRxa9oJseerBgdx2GXeJ /THV/Jwclo4SNHQw91cAAShwwgThlgjqd2HGpSLeQ3efmVkRe60Nzshk07Ouq2bpmQzB Bpycgr1448Knsg1E3JaXiuztIe+M7dFES/6lqqyifau4uEkT27U5BbvqCR7eaJQCGmHt QyjHonmj7PgN7zvlQav/KL8plyT1/KXMweLPrq3k2ELDi07NaywY/klDu3yxrcrle3xP qArw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=c8Vqp36J; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Rw0AHCdM; dkim=neutral (no key) header.i=@suse.de header.b=+h4QL8Di; 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 m12si10844063ild.137.2021.06.20.22.13.47; Sun, 20 Jun 2021 22:14:07 -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=c8Vqp36J; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Rw0AHCdM; dkim=neutral (no key) header.i=@suse.de header.b=+h4QL8Di; 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 S229479AbhFUFPs (ORCPT + 99 others); Mon, 21 Jun 2021 01:15:48 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:48284 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhFUFPq (ORCPT ); Mon, 21 Jun 2021 01:15:46 -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-out2.suse.de (Postfix) with ESMTPS id 01D6E1FD2A; Mon, 21 Jun 2021 05:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624252412; 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=OSm3BeKTVRHfNdji1+7Zgv6lEY28TkAM1A0d1NHpK8c=; b=c8Vqp36J268rgBYp6RIU/lXl3QptUgj1f/qqc9YSkpQUgj3wpj2v3AflYH5zca+9RUqhOf 9MUHF2OU3VDqF3iDL9OdoKNXLVJNdV4kJ5K1lk22FKVVF45X56Wuxf8EehAGWFmikqsMG1 gSMa66FuZYSaGrRPgmvP4BFa2PAdbXs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624252412; 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=OSm3BeKTVRHfNdji1+7Zgv6lEY28TkAM1A0d1NHpK8c=; b=byGZnzGC+9jjbpxcBmiHEPQ0ST+5i+EKcfSddTT1csBReUhT3A1N6RJ4IvC3cr9F6191wm EW8BkZy85RhLpaAw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id F1763118DD; Mon, 21 Jun 2021 05:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624252411; 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=OSm3BeKTVRHfNdji1+7Zgv6lEY28TkAM1A0d1NHpK8c=; b=Rw0AHCdMq8i/b0yYeCm4hF3T36D2dlK8ZokTEg3xXrlMkc09Qcu7ZulzVyhLR9P1Tjg5IV hC1XBZiZV+69eEeqmTMUyPqYNh+W+gKXa0iliIcXwHqJGFb1fZ71L0zbynNKs/QWWGq1ns KfWwJEWt0LHRPnb9bEcaNtYKftaZU4I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624252411; 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=OSm3BeKTVRHfNdji1+7Zgv6lEY28TkAM1A0d1NHpK8c=; b=+h4QL8Di4bGSSouT21p1K8u0UeICxm5P5hKh+5pyMASQnSagLPQPyJhjbCAdASkwOfXfEL uVz9v9pg5WCFnqDg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id hP7xJ/of0GAZUwAALh3uQQ (envelope-from ); Mon, 21 Jun 2021 05:13:30 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Wang Yugui" Cc: linux-nfs@vger.kernel.org Subject: Re: any idea about auto export multiple btrfs snapshots? In-reply-to: <162425113589.17441.4163890972298681569@noble.neil.brown.name> References: <20210617122852.BE6A.409509F4@e16-tech.com>, <162397637680.29912.2268876490205517592@noble.neil.brown.name>, <20210618152631.F3DE.409509F4@e16-tech.com>, <162425113589.17441.4163890972298681569@noble.neil.brown.name> Date: Mon, 21 Jun 2021 15:13:27 +1000 Message-id: <162425240757.17441.3695249639927377778@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org > > It seems more fixes are needed. > > I think the problem is that the submount doesn't appear in /proc/mounts. > "nfsd_fh()" in nfs-utils needs to be able to map from the uuid for a > filesystem to the mount point. To do this it walks through /proc/mounts > checking the uuid of each filesystem. If a filesystem isn't listed > there, it obviously fails. > > I guess you could add code to nfs-utils to do whatever "btrfs subvol > list" does to make up for the fact that btrfs doesn't register in > /proc/mounts. Another approach might be to just change svcxdr_encode_fattr3() and nfsd4_encode_fattr() in the 'FSIDSOJURCE_UUID' case to check if dentry->d_inode has a different btrfs volume id to exp->ex_path.dentry->d_inode. If it does, then mix the volume id into the fsid somehow. With that, you wouldn't want the first change I suggested. NeilBrown