From: Al Viro <viro@ZenIV.linux.org.uk>
To: Patrick McLean <patrick@cim.mcgill.ca>
Cc: Patrick McLean <patrickm@gaikai.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Trond Myklebust <Trond.Myklebust@netapp.com>,
linux-nfs@vger.kernel.org
Subject: Re: Regression with initramfs and nfsroot (appears to be in the dcache)
Date: Fri, 30 Nov 2012 01:36:28 +0000 [thread overview]
Message-ID: <20121130013628.GZ4939@ZenIV.linux.org.uk> (raw)
In-Reply-To: <50B8046F.7030308@cim.mcgill.ca>
On Thu, Nov 29, 2012 at 04:57:19PM -0800, Patrick McLean wrote:
> > Interesting... Server-side that should've been produced by
> > encode_entryplus_baggage(), which looks like failing compose_entry_fh()...
> > which has explicit
> > if (d_mountpoint(dchild))
> > goto out;
> > resulting in ENOENT on everything that's overmounted on server.
> >
> > Do you, by any chance, have the server really exporting its own root
> > filesystem? Another thing to check: have nfs_prime_dcache() print
> > filename.name of everything that fails nfs_same_entry() and has
> > zero entry->fh->size, regardless of d_invalidate() results.
>
> The server is running 3.6.6 and is just exporting a subdir of an xfs filesystem (which does not happen to be the root filesystem).
>
> The client is running as a KVM guest on the machine that is serving the NFS. I am reproducing this by booting the guest via an initramfs, and doing
> "ls /" at in single user mode.
>
> I added a check that prints the filename.name of everything that fails nfs_same_file, and it appears to just be triggered by the same filesystems that
> are triggering the WARN_ON, the relevant dmesg is below.
[the same /dev, /proc and /sys]
Very interesting. Do you have anything mounted on the corresponding
directories on server? The picture looks like you are getting empty
fhandles in readdir+ respons for exactly the same directories that happen
to be mountpoints on client. In any case, we shouldn't do that blind
d_drop() - empty fhandles can happen. The only remaining question is
why do they happen on that set of entries. From my reading of
encode_entryplus_baggage() it looks like we have compose_entry_fh()
failing for those entries and those entries alone. One possible cause
would be d_mountpoint(dchild) being true on server. If it is true, we
can declare the case closed; if not, I really wonder what's going on.
Note that if the same fs is mounted elsewhere, d_mountpoint() would mean
that something is mounted on top of that directory in _some_ instance;
not necessary the exported one. Can you slap printks on fs/nfsd/nfs3xdr.c
compose_entry_fh() failure exits and see which one triggers server-side?
next prev parent reply other threads:[~2012-11-30 1:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 19:16 Regression with initramfs and nfsroot (appears to be in the dcache) Patrick McLean
2012-11-29 21:33 ` Al Viro
2012-11-29 22:06 ` Patrick McLean
2012-11-29 22:21 ` Al Viro
2012-11-29 22:53 ` Patrick McLean
2012-11-29 23:43 ` Al Viro
2012-11-30 0:19 ` Patrick McLean
2012-11-30 0:35 ` Al Viro
2012-11-30 0:57 ` Patrick McLean
2012-11-30 1:36 ` Al Viro [this message]
2012-11-30 1:54 ` Patrick McLean
[not found] ` <50B811BA.6070503-NrXZpuFoTVF8GC8d84axZg@public.gmane.org>
2012-11-30 2:00 ` Al Viro
[not found] ` <20121130020047.GA4939-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2012-11-30 2:33 ` Patrick McLean
[not found] ` <50B81B11.7050704-aTCcZBytkHbQT0dZR+AlfA@public.gmane.org>
2012-11-30 4:11 ` Al Viro
2012-11-30 13:58 ` Myklebust, Trond
2012-12-01 21:40 ` Al Viro
2012-12-01 2:18 ` Simon Kirby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121130013628.GZ4939@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=patrick@cim.mcgill.ca \
--cc=patrickm@gaikai.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).