All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Pearson <james-p@moving-picture.com>
To: jmoyer@redhat.com
Cc: autofs mailing list <autofs@linux.kernel.org>
Subject: Re: subdirs trying to be mounted when using ghosting
Date: Wed, 25 Jan 2006 12:35:00 +0000	[thread overview]
Message-ID: <43D77074.4090308@moving-picture.com> (raw)
In-Reply-To: <17366.24875.680488.918796@segfault.boston.redhat.com>

I'm seeing a very similar problem on clients using a 2.4.30 kernel (with 
the 20041227 autofs4 patch) - do you (or anyone else) know if this patch 
will work on 2.4.x clients? The code this patch touches appears to be 
identical in the 2.4.x autofs4 source.

Thanks

James Pearson

Jeff Moyer wrote:
> ==> Regarding [autofs] subdirs trying to be mounted when using ghosting; Johan van den Dorpe <johan.vandendorpe@framestore-cfc.com> adds:
> 
> johan.vandendorpe> Hi guys We're having a problem when trying to access a
> johan.vandendorpe> subdir of an automount directory that isn't
> johan.vandendorpe> mounted. Instead of looking up the mount entry for the
> johan.vandendorpe> directory, a subdir is looked up instead. If the exact
> johan.vandendorpe> dir of the entry is accessed, then it mounts fine.
> 
> Fixed by Ian in more recent kernels.  Patch was something like the
> attached, though you'd do better to drop this part, I think:
> 
> -		return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
> +		return (dentry->d_time - jiffies <= 0);
> 
> 
> -Jeff
> 
> diff -Nurp linux-2.6.12.orig/fs/autofs4/expire.c linux-2.6.12/fs/autofs4/expire.c
> --- linux-2.6.12.orig/fs/autofs4/expire.c	2005-06-18 03:48:29.000000000 +0800
> +++ linux-2.6.12/fs/autofs4/expire.c	2005-10-09 15:11:37.000000000 +0800
> @@ -177,7 +177,7 @@ resume:
>  		DPRINTK("dentry %p %.*s",
>  			dentry, (int)dentry->d_name.len, dentry->d_name.name);
>  
> -		if (!list_empty(&dentry->d_subdirs)) {
> +		if (!simple_empty_nolock(dentry)) {
>  			this_parent = dentry;
>  			goto repeat;
>  		}
> @@ -269,7 +269,7 @@ static struct dentry *autofs4_expire(str
>  			goto next;
>  		}
>  
> -		if ( simple_empty(dentry) )
> +		if (simple_empty(dentry))
>  			goto next;
>  
>  		/* Case 2: tree mount, expire iff entire tree is not busy */
> diff -Nurp linux-2.6.12.orig/fs/autofs4/root.c linux-2.6.12/fs/autofs4/root.c
> --- linux-2.6.12.orig/fs/autofs4/root.c	2005-06-18 03:48:29.000000000 +0800
> +++ linux-2.6.12/fs/autofs4/root.c	2005-10-09 15:52:04.000000000 +0800
> @@ -386,13 +386,13 @@ static int autofs4_revalidate(struct den
>  
>  	/* Negative dentry.. invalidate if "old" */
>  	if (dentry->d_inode == NULL)
> -		return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
> +		return (dentry->d_time - jiffies <= 0);
>  
>  	/* Check for a non-mountpoint directory with no contents */
>  	spin_lock(&dcache_lock);
>  	if (S_ISDIR(dentry->d_inode->i_mode) &&
>  	    !d_mountpoint(dentry) && 
> -	    list_empty(&dentry->d_subdirs)) {
> +	    simple_empty_nolock(dentry)) {
>  		DPRINTK("dentry=%p %.*s, emptydir",
>  			 dentry, dentry->d_name.len, dentry->d_name.name);
>  		spin_unlock(&dcache_lock);
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
> 

      parent reply	other threads:[~2006-01-25 12:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-24 16:40 subdirs trying to be mounted when using ghosting Johan van den Dorpe
2006-01-24 17:17 ` Jeff Moyer
2006-01-25 11:50   ` Johan van den Dorpe
2006-01-25 12:35   ` James Pearson [this message]

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=43D77074.4090308@moving-picture.com \
    --to=james-p@moving-picture.com \
    --cc=autofs@linux.kernel.org \
    --cc=jmoyer@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.