mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: raven@themaw.net
Cc: autofs@linux.kernel.org, linux-kernel@vger.kernel.org
Subject: autofs4 looks up wrong path element when ghosting is enabled
Date: Tue, 20 Sep 2005 15:02:04 -0400	[thread overview]
Message-ID: <17200.23724.686149.394150@segfault.boston.redhat.com> (raw)

Hi, Ian, list,

I have a bug filed against autofs when ghosting is enabled.  The best way
to describe the bug is to walk through the reproducer, I guess.

Take the following maps, for example:

auto.master
/sbox	auto.sbox

auto.sbox:
src	segfault:/sbox/src/

Let's say that there is a file, id3_0.12.orig.tar.gz, in segfault:/sbox/src/.

To reproduce the problem, stop the nfs service on the server.

On the client, do an 'ls /sbox/src/id3_012.orig.tar.gz'.  This will fail,
as well it should.  However, if we look in the logs, we find this:

automount[1182]: handle_packet_missing: token 1, name src 
automount[1182]: attempting to mount entry /sbox/src
...
automount[1481]: mount(nfs): calling mkdir_path /sbox/src
automount[1481]: mount(nfs): calling mount -t nfs -s-o tcp,intr,timeo=600,rsize=8192,wsize=8192,retrans=5 segfault:/sbox/src /sbox/src
automount[1481]: >> mount: RPC: Program not registered
automount[1481]: mount(nfs): add_bad_host: segfault:/sbox/src
automount[1481]: mount(nfs): nfs: mount failure segfault:/sbox/src on /sbox/src
automount[1481]: failed to mount /sbox/src
...
automount[1182]: send_fail: token=1 
automount[1182]: handle_packet: type = 0 
automount[1182]: handle_packet_missing: token 2, name src/id3_0.12.orig.tar.gz 
automount[1182]: attempting to mount entry /sbox/src/id3_0.12.orig.tar.gz

Noteworthy are these last two lines!  Even though the mount failed, we are
continuing the lookup.  The culprit is here, in cached_lookup:

    if (!dentry->d_op->d_revalidate(dentry, flags) && !d_invalidate(dentry)) { 
            dput(dentry); 
            dentry = NULL; 
    } 

d_revalidate points to autofs4_revalidate, which calls try_to_fill_dentry,
which will return a status of 0.  Since ghosting is enabled,
d_invalidate(dentry) will return -EBUSY, and so we return the dentry to the
caller, which then continues the lookup.

Ian, I'm not really sure how we can address this issue without VFS
changes.  Any ideas?

Oh, also note that, once the nfs service is started up again on the server,
the lookup of a specific file name will still fail!  In this case, the
daemon won't even be called.

-Jeff

             reply	other threads:[~2005-09-20 19:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 19:02 Jeff Moyer [this message]
2005-09-21  1:25 ` Ian Kent
2005-09-22 21:09   ` Jeff Moyer
2005-09-24  8:59     ` Ian Kent
2005-09-24 20:51       ` Jeff Moyer
2005-09-25  1:25         ` Ian Kent
2005-09-26 15:14           ` Jeff Moyer
2005-09-27  4:21             ` Ian Kent
2005-09-26 20:57           ` Jeff Moyer
2005-09-27  4:34             ` Ian Kent
2005-10-08  5:43             ` Ian Kent
2005-10-08 12:50               ` Jeff Moyer
2005-10-09  4:29                 ` Ian Kent
2005-10-15 12:30             ` Ian Kent
2005-10-19 20:49               ` Jeff Moyer
2005-10-20  0:50                 ` Ian Kent
2005-10-29  7:42                 ` Ian Kent
2005-10-31 11:33                   ` Jeff Moyer
2005-10-31 13:27                     ` Ian Kent
2005-11-05  9:50                       ` [autofs] " Ian Kent
2005-11-10 23:51                         ` Jeff Moyer
2005-11-11 14:53                           ` Ian Kent

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=17200.23724.686149.394150@segfault.boston.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=autofs@linux.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    /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

all inboxes | Powered by JetHome®