Re: Linux 2.6.26-rc4

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Viro <viro@...>
Cc: Ian Kent <raven@...>, Linus Torvalds <torvalds@...>, Miklos Szeredi <miklos@...>, <jesper@...>, <linux-kernel@...>, <linux-fsdevel@...>
Date: Tuesday, June 3, 2008 - 3:53 pm

Al Viro <viro@ZenIV.linux.org.uk> writes:


Probably historic.  Ian?


Another good point.


The life cycle of a dentry for an indirect, non-browsable mount goes
something like this:

autofs4_lookup is called on behalf a process trying to walk into an
automounted directory.  That dentry's d_flags is set to
DCACHE_AUTOFS_PENDING but not hashed.  A waitqueue entry is created,
indexed off of the name of the dentry.  A callout is made to the
automount daemon (via autofs4_wait).

The daemon looks up the directory name in its configuration.  If it
finds a valid map entry, it will then create the directory using
sys_mkdir.  The autofs4_lookup call on behalf of the daemon (oz_mode ==
1) will return NULL, and then the mkdir call will be made.  The
autofs4_mkdir function then instantiates the dentry which, by the way,
is different from the original dentry passed to autofs4_lookup.  (This
dentry also does not get the PENDING flag set, which is a bug addressed
by a patch set that Ian and I have been working on;  specifically, the
idea is to reuse the dentry from the original lookup, but I digress).

The daemon then mounts the share on the given directory and issues an
ioctl to wakeup the waiter.  When awakened, the waiter clears the
DCACHE_AUTOFS_PENDING flag, does another lookup of the name in the
dcache and returns that dentry if found.

Later, the dentry gets expired via another ioctl.  That path sets
the AUTOFS_INF_EXPIRING flag in the d_fsdata associated with the dentry.
It then calls out to the daemon to perform the unmount and rmdir.  The
rmdir unhashes the dentry (and places it on the rehash list).

The dentry is removed from the rehash list if there was a racing expire
and mount or if the dentry is released.

This description is valid for the tree as it stands today.  Ian and I
have been working on fixing some other race conditions which will change
the dentry life cycle (for the better, I hope).



Nothing.  There used to be, and I'm guessing Ian kept this around for,
umm, clarity?


I'm afraid I'm not familiar enough with that part of the code to give
you a good answer.  Ian?

Cheers,

Jeff
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux 2.6.26-rc4, Linus Torvalds, (Mon May 26, 2:41 pm)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Wed Jun 4, 1:51 pm)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Tue Jun 3, 5:49 am)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 5:57 am)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 6:35 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Tue Jun 3, 6:04 am)
Re: Linux 2.6.26-rc4, Miklos Szeredi, (Tue Jun 3, 6:13 am)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 6:40 am)
Re: Linux 2.6.26-rc4, Miklos Szeredi, (Tue Jun 3, 6:45 am)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 6:52 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 9:27 am)
Re: Linux 2.6.26-rc4, Linus Torvalds, (Tue Jun 3, 11:01 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Thu Jun 5, 3:31 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Fri Jun 6, 2:23 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Fri Jun 6, 4:21 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Fri Jun 6, 4:25 am)
Re: Linux 2.6.26-rc4, Andrew Morton, (Thu Jun 5, 6:30 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Fri Jun 27, 12:18 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Thu Jun 5, 10:47 pm)
Re: Linux 2.6.26-rc4, Linus Torvalds, (Thu Jun 5, 5:29 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Thu Jun 5, 10:39 pm)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Thu Jun 5, 5:34 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 12:07 pm)
Re: Linux 2.6.26-rc4, Linus Torvalds, (Tue Jun 3, 12:35 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:13 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 1:30 pm)
Re: Linux 2.6.26-rc4, Jeff Moyer, (Tue Jun 3, 1:46 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 3:18 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 9:36 pm)
Re: Linux 2.6.26-rc4, Jeff Moyer, (Tue Jun 3, 3:53 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 7:00 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 10:42 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 10, 12:57 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Tue Jun 10, 2:28 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 10, 2:40 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Wed Jun 11, 11:03 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Thu Jun 12, 7:19 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Thu Jun 12, 3:02 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Thu Jun 12, 7:21 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 10, 5:09 am)
Re: Linux 2.6.26-rc4, Miklos Szeredi, (Wed Jun 4, 1:34 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Wed Jun 4, 1:41 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:38 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 12:41 pm)
Re: Linux 2.6.26-rc4, Linus Torvalds, (Tue Jun 3, 12:59 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:30 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 12:50 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:28 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 1:41 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:41 pm)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 1:50 pm)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 1:49 pm)
Re: Linux 2.6.26-rc4, Miklos Szeredi, (Tue Jun 3, 6:37 am)
Re: Linux 2.6.26-rc4, Al Viro, (Tue Jun 3, 6:48 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 9:31 am)
Re: Linux 2.6.26-rc4, Ian Kent, (Tue Jun 3, 9:32 am)
Re: Linux 2.6.26-rc4, J.A. , (Tue May 27, 6:01 am)
Re: Linux 2.6.26-rc4, Bill Davidsen, (Wed May 28, 7:59 pm)
2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Tue May 27, 1:23 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Oleg Nesterov, (Tue May 27, 5:06 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Linus Torvalds, (Tue May 27, 11:03 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Oleg Nesterov, (Tue May 27, 12:45 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Oleg Nesterov, (Tue May 27, 1:37 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Tue May 27, 5:26 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Tue May 27, 11:40 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Linus Torvalds, (Tue May 27, 12:11 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Tue May 27, 1:06 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Wed May 28, 1:01 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Wed May 28, 3:26 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Mon May 26, 5:24 pm)
Re: Linux 2.6.26-rc4, Linus Torvalds, (Mon May 26, 5:42 pm)
Re: Linux 2.6.26-rc4, Carl-Daniel Hailfinger, (Mon May 26, 9:16 pm)
Re: Linux 2.6.26-rc4, Jeff Garzik, (Tue May 27, 6:35 am)
Re: Linux 2.6.26-rc4, Carl-Daniel Hailfinger, (Tue May 27, 6:53 am)
Re: Linux 2.6.26-rc4, Jeff Garzik, (Tue May 27, 6:54 am)
Re: Linux 2.6.26-rc4, Carl-Daniel Hailfinger, (Tue May 27, 6:58 am)
Re: Linux 2.6.26-rc4, Carl-Daniel Hailfinger, (Mon May 26, 9:23 pm)
Re: Linux 2.6.26-rc4, Abhijit Menon-Sen, (Mon May 26, 9:52 pm)
Re: Linux 2.6.26-rc4, David Woodhouse, (Tue May 27, 1:31 am)
[MTD] [MAPS] ck804rom: fix driver_data in probe table., David Woodhouse, (Tue May 27, 1:31 am)
Re: Linux 2.6.26-rc4, Jesper Krogh, (Tue May 27, 1:19 am)
Re: Linux 2.6.26-rc4, Arjan van de Ven, (Mon May 26, 8:25 pm)
Re: Linux 2.6.26-rc4, David Woodhouse, (Tue May 27, 1:43 am)
Re: Linux 2.6.26-rc4, Arjan van de Ven, (Tue May 27, 2:00 am)
Re: Linux 2.6.26-rc4, David Woodhouse, (Tue May 27, 2:24 am)
Re: Linux 2.6.26-rc4, Arjan van de Ven, (Mon May 26, 8:31 pm)