On Mon, May 03, 2021 at 12:21:27PM +1000, NeilBrown wrote: > 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<interface> > > > > > > > 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. Yes, that's just the default, sorry for the distraction.... > Problem is that a subdirectory of a tmpfs filesystem is being exported. Yuck. > 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. Got it, that makes sense. --b.