public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* proc path_walk glitch ?
@ 2005-02-20 20:09 Der Herr Hofrat
  2005-02-20 21:11 ` Matthias-Christian Ott
  0 siblings, 1 reply; 3+ messages in thread
From: Der Herr Hofrat @ 2005-02-20 20:09 UTC (permalink / raw)
  To: linux-kernel


HI !

 I noticed a slight proc filesystem strangness in the 2.4.2X and 2.6.X 
 (atleast up to 2.6.8).  Assuming that process 8655 exists and is running 
 long enough (ls -lR / or so)

cd /proc/8655
kill -9 8655
ls
/usr/bin/ls: .: Stale NFS file handle

open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ESTALE (Stale NFS file handle)  from  fs/namei.c -> link_path_walk :

int fastcall link_path_walk(const char * name, struct nameidata *nd)
{
	struct dentry *dentry;
	struct inode *inode;
	int err;
	unsigned int lookup_flags = nd->flags;

	while (*name=='/')
		name++;
	if (!*name)
		goto return_reval;
	...

return_reval:
		/*
		 * We bypassed the ordinary revalidation routines.
		 * Check the cached dentry for staleness.
		 */
		dentry = nd->dentry;
		if (dentry && dentry->d_op && dentry->d_op->d_revalidate) {
			err = -ESTALE;
			if (!dentry->d_op->d_revalidate(dentry, 0)) {
				d_invalidate(dentry);
				break;
			}
		}


 Why does return_reval return -ESTALE instead of -ENOENT here - might need an
extra check on what filesystem this is working on ?

/usr/bin/ls: .: no such file or directory

 would seem more meaningfull to me when I find it in a logfile.

thx !
hofrat

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: proc path_walk glitch ?
  2005-02-20 20:09 proc path_walk glitch ? Der Herr Hofrat
@ 2005-02-20 21:11 ` Matthias-Christian Ott
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias-Christian Ott @ 2005-02-20 21:11 UTC (permalink / raw)
  To: Der Herr Hofrat; +Cc: linux-kernel

Der Herr Hofrat wrote:

>HI !
>
> I noticed a slight proc filesystem strangness in the 2.4.2X and 2.6.X 
> (atleast up to 2.6.8).  Assuming that process 8655 exists and is running 
> long enough (ls -lR / or so)
>
>cd /proc/8655
>kill -9 8655
>ls
>/usr/bin/ls: .: Stale NFS file handle
>
>open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ESTALE (Stale NFS file handle)  from  fs/namei.c -> link_path_walk :
>
>int fastcall link_path_walk(const char * name, struct nameidata *nd)
>{
>	struct dentry *dentry;
>	struct inode *inode;
>	int err;
>	unsigned int lookup_flags = nd->flags;
>
>	while (*name=='/')
>		name++;
>	if (!*name)
>		goto return_reval;
>	...
>
>return_reval:
>		/*
>		 * We bypassed the ordinary revalidation routines.
>		 * Check the cached dentry for staleness.
>		 */
>		dentry = nd->dentry;
>		if (dentry && dentry->d_op && dentry->d_op->d_revalidate) {
>			err = -ESTALE;
>			if (!dentry->d_op->d_revalidate(dentry, 0)) {
>				d_invalidate(dentry);
>				break;
>			}
>		}
>
>
> Why does return_reval return -ESTALE instead of -ENOENT here - might need an
>extra check on what filesystem this is working on ?
>
>/usr/bin/ls: .: no such file or directory
>
> would seem more meaningfull to me when I find it in a logfile.
>
>thx !
>hofrat
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>
>  
>
Does it happen in 2.6.10 or are you sing 2.6.8?

Matthias-Christian Ott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: proc path_walk glitch ?
       [not found] <fa.f4pcrfo.f22jh6@ifi.uio.no>
@ 2005-02-20 22:14 ` Bodo Eggert
  0 siblings, 0 replies; 3+ messages in thread
From: Bodo Eggert @ 2005-02-20 22:14 UTC (permalink / raw)
  To: Der Herr Hofrat, linux-kernel

Der Herr Hofrat <der.herr@hofr.at> wrote:

> cd /proc/8655
> kill -9 8655
> ls
> /usr/bin/ls: .: Stale NFS file handle

Seems to be fixed in 2.6.10-ac9 or earlier

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-20 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-20 20:09 proc path_walk glitch ? Der Herr Hofrat
2005-02-20 21:11 ` Matthias-Christian Ott
     [not found] <fa.f4pcrfo.f22jh6@ifi.uio.no>
2005-02-20 22:14 ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox