Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1527330pxy; Fri, 23 Apr 2021 10:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz1amScPaJkobQWcdf/VDjdVdIQaY2DuinyT76kW2l0r7ftu/fHX1MhjG0eEMTITQgGNpC X-Received: by 2002:a63:556:: with SMTP id 83mr4672138pgf.188.1619197588188; Fri, 23 Apr 2021 10:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619197588; cv=none; d=google.com; s=arc-20160816; b=JBkkYQlrrgispKrmBTfW1zBxjncS5zgOE5Z7im1BbE51LaOmf3Vc2G3muI5RdI6lGT BxiyxT1sJOUFCCYngxDmOsQhYmVNxaSbV6jYHHdxiNhL4HQyCmG7Hn6Aq7f2nbi0JBb/ cO+Ld8htb4HPZ+ehXO5ERG5aE4QFybwEVhgu6WYI625RpuFd4AA0HmtQwwGf3UuButsq bJ2VLB+Yi/oIdP/rusx41xKfL+7pEVz258kitvuJ9NYQbsOH8hFaFaSQnDznCLeFbmEm xx8nAzUXsUrR67khQJVuJfaZQ0z5TbEiWDtXzJ2LKkBM38yhE3Yv1rmdEnzxYzrBpr0n 9BnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=OjpZABCzE1112WtR4ABKmsFpEZckA4omHMelrwjJqnQ=; b=fHG34EluLU5/AkH+1AwvvkVQqGUvbwKgzyY3abLHSG5/OftdWiYFcGbZUeI3sG1bwN I+psEMrGOduzsA3S909XSpfYo8sYcNCL+PgdJ+QTG3yi/8VWsq1DzP+QKU/7bTmglEdd oK6LqsQGOpqnkZqKI6bJvb+AQhZjEalEPBMOfcuYcs/T/26LB0jwWSIarn7kmfVZ9OoT hChVFZpjx+uO4YOOEBKIqOHaFz2GLcVpiMBqpYcOmq0EqZXdqseBhi0dB7H9E3jjPCwI Eihk/+82YqUlYEKC343EZrZuIGPyqdnIfnX/20b2Day56gPjbc5tYTsy1rK2pH9P2Ou7 jXZg== 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 u9si8728528plg.123.2021.04.23.10.06.03; Fri, 23 Apr 2021 10:06:28 -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 S243190AbhDWRFV (ORCPT + 99 others); Fri, 23 Apr 2021 13:05:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:34104 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbhDWRFU (ORCPT ); Fri, 23 Apr 2021 13:05:20 -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 0341CADAA; Fri, 23 Apr 2021 17:04:43 +0000 (UTC) Date: Fri, 23 Apr 2021 19:04:41 +0200 From: Petr Vorel To: "J . Bruce Fields" Cc: linux-nfs@vger.kernel.org, Steve Dickson , NeilBrown , Chuck Lever , Alexey Kodanev Subject: Re: [RFC PATCH 1/1] mount.nfs: Fix mounting on tmpfs Message-ID: Reply-To: Petr Vorel References: <20210422191803.31511-1-pvorel@suse.cz> <20210422202334.GB25415@fieldses.org> <20210423142329.GB10457@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210423142329.GB10457@fieldses.org> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 tcpdump -s0 -iany host 10.0.0.1 and 10.0.0.2 > First, though, what's the output of "exportfs -v" on the server? * v3 (the only working) mount -t nfs -o proto=tcp,vers=3 10.0.0.2:/tmp/LTP_nfs01.S5dolLhIlD/3/tcp /tmp/LTP_nfs01.S5dolLhIlD/3/0 exportfs -v /tmp/LTP_nfs01.S5dolLhIlD/3/tcp (sync,wdelay,hide,no_subtree_check,fsid=6436,sec=sys,rw,secure,no_root_squash,no_all_squash) * v4 mount -t nfs -o proto=tcp,vers=4 10.0.0.2:/tmp/LTP_nfs01.5yzuZYRSRl/4/tcp /tmp/LTP_nfs01.5yzuZYRSRl/4/0 mount.nfs: mounting 10.0.0.2:/tmp/LTP_nfs01.5yzuZYRSRl/4/tcp failed, reason given by server: No such file or directory exportfs -v /tmp/LTP_nfs01.5yzuZYRSRl/4/tcp (sync,wdelay,hide,no_subtree_check,fsid=6695,sec=sys,rw,secure,no_root_squash,no_all_squash) * v4.1 mount -t nfs -o proto=tcp,vers=4.1 10.0.0.2:/tmp/LTP_nfs01.xSWfcygtYM/4.1/tcp /tmp/LTP_nfs01.xSWfcygtYM/4.1/0 mount.nfs: mounting 10.0.0.2:/tmp/LTP_nfs01.xSWfcygtYM/4.1/tcp failed, reason given by server: No such file or directory exportfs -v /tmp/LTP_nfs01.xSWfcygtYM/4.1/tcp (sync,wdelay,hide,no_subtree_check,fsid=6965,sec=sys,rw,secure,no_root_squash,no_all_squash) * v4.2 mount -t nfs -o proto=tcp,vers=4.2 10.0.0.2:/tmp/LTP_nfs01.xkKpqpRikV/4.2/tcp /tmp/LTP_nfs01.xkKpqpRikV/4.2/0 mount.nfs: mounting 10.0.0.2:/tmp/LTP_nfs01.xkKpqpRikV/4.2/tcp failed, reason given by server: No such file or directory exportfs -v /tmp/LTP_nfs01.xkKpqpRikV/4.2/tcp (sync,wdelay,hide,no_subtree_check,fsid=7239,sec=sys,rw,secure,no_root_squash,no_all_squash) > Note you need an "fsid=" option on tmpfs exports. Yes, the test uses PID based fsid: fsid=$$ > --b. Thanks a lot for your time! Kind regards, Petr