Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2336777pxy; Sun, 2 May 2021 19:28:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEFa+Aryn/R63lfEHIG9qfoVo7hHlo88z9u8t3GE9ULwxO5HMcu2324PKntZz/bAHUWv7H X-Received: by 2002:a05:6402:104c:: with SMTP id e12mr17222064edu.108.1620008915475; Sun, 02 May 2021 19:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620008915; cv=none; d=google.com; s=arc-20160816; b=MR7UqhIvQQceqh5p6meD8IuAIiTP13mQZ/Ruy/QJnPcViVjar2kOAkNqQpI70kS/Qg Un24w+Mlf+ILm1znz97FbWHUSD7lr5feIdyQkrZTX6F240CmXICwoYRRU3UUYG+VKH29 IRRCK3qXAERlQUKEdEN42mC3snoe+bKcH8dbgpn/KoKzzhMInHbO5atx6/Fmb99C7/EY 47vt3vnbytWEqiBy0CauN+QXjo9cwCo73Ns8FGaphFcH8/xHc5Tx7YmvazI2a2eptwJq TghshRaioGLTRFqA76dfA3kbXlba2FSkJH2zSG6ooSleL7OOHsVOLVnPXX4McDdaGcT5 /fuA== 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; bh=RxC8+dptUzFNG8mSFwkJ7iyPA5ci7HesNeJhsqEppFw=; b=ONGaHsTX8FL1XsLsvYZ15Wild1XKIe4fsN1wcpLZ8oyz+I2KQVV/MrmCa4Zjy+HxW+ tIglu0sfORRB/ngnIgQ4QxOhRr+wn0NK53vu8JNrvFwXdAirFzrGdxtfN8lM8qH+34EK Ai3m1qn88+hI+Ch6dkCZVpXhVaR4qdQesdzgTbVgHIAK92W1uQ67VRCcRgR7HvUwrRuh OBK2Xs1Zy4rJkws2Y5HXUImBuRZHt+hui38k+4i7ROPEphV4ahgSWiZlDTfDpiB8XtC8 6RdkDB6kX7DdAZWzj3qXUKWLNszSVLue3KXPKACx/6LwAPtaBFBvKunKK76Bt0CQwoCQ PycA== 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 w11si498851eja.618.2021.05.02.19.27.52; Sun, 02 May 2021 19:28: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 S232853AbhECCYO convert rfc822-to-8bit (ORCPT + 99 others); Sun, 2 May 2021 22:24:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:43216 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232845AbhECCYN (ORCPT ); Sun, 2 May 2021 22:24:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6FC84B20B; Mon, 3 May 2021 02:23:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 From: "NeilBrown" To: "J . Bruce Fields" Cc: "Petr Vorel" , linux-nfs@vger.kernel.org, "Steve Dickson" , "Chuck Lever" , "Alexey Kodanev" Subject: Re: Re: [RFC PATCH 1/1] mount.nfs: Fix mounting on tmpfs In-reply-to: <20210423181345.GE10457@fieldses.org> References: <20210422191803.31511-1-pvorel@suse.cz>, <20210422202334.GB25415@fieldses.org>, , <20210423142329.GB10457@fieldses.org>, , <20210423181345.GE10457@fieldses.org> Date: Mon, 03 May 2021 12:21:27 +1000 Message-id: <162000848714.10466.9299093696289919822@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, 24 Apr 2021, J . Bruce Fields wrote: > On Fri, Apr 23, 2021 at 07:04:41PM +0200, Petr Vorel wrote: > > Hi Bruce, > > > > > On Fri, Apr 23, 2021 at 04:17:52AM +0200, Petr Vorel wrote: > > > > Hi, > > > > > > > On Thu, Apr 22, 2021 at 09:18:03PM +0200, Petr Vorel wrote: > > > > > > LTP NFS tests (which use netns) fails on tmpfs since d4066486: > > > > > > > > mount -t nfs -o proto=tcp,vers=4.2 10.0.0.2:/tmp/ltp.nfs01.nfs-4.2/LTP_nfs01.UF6gRZCy3O/4.2/tcp /tmp/ltp.nfs01.nfs-4.2/LTP_nfs01.UF6gRZCy3O/4.2/0 > > > > > > mount.nfs: mounting 10.0.0.2:/tmp/ltp.nfs01.nfs-4.2/LTP_nfs01.UF6gRZCy3O/4.2/tcp failed, reason given by server: No such file or directory > > > > > > > We should figure out the reason for the failure. A network trace might > > > > > help. > > > > > > Anything specific you're looking for? > > > > > Actually I was thinking of capturing the network traffic, something > > > like: > > > tcpdump -s0 -wtmp.pcap -i > > > > > then try the mount, then kill tcpdump and look at tmp.pcap. > > > > I don't see anything suspicious, can you please have a look? > > https://gitlab.com/pevik/tmp/-/raw/master/nfs.v3.pcap > > https://gitlab.com/pevik/tmp/-/raw/master/nfs.v4.pcap > > https://gitlab.com/pevik/tmp/-/raw/master/nfs.v4.1.pcap > > https://gitlab.com/pevik/tmp/-/raw/master/nfs.v4.2.pcap > > It might be the "hide" option, that's odd: Nup. I think "hide" is ignored for NFSv4 anyway. Problem is that a subdirectory of a tmpfs filesystem is being exported. That requires (for NFSv4), the top of the tmpfs filesystem to be exported with NFSEXP_V4ROOT so that an NFSv4 client can navigate down to it. But when mountd creates that V4ROOT export, it doesn't provide the fsid. So the kernel rejects the export request. We need to fix mountd to set the fsid on all exports within a filesystem for which it was specified, particularly the NFSEXP_V4ROOT ancestors. I might see if I how easy that is later. NeilBrown