lkml.org 
[lkml]   [1997]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: patch for fs/dcache race
> I thought of that, but it's not an issue. You can't delete a directory
> unless it's empty.

So the file, and some number of parent directories, are going to
be deleted. Do you care to know about the deletion status of the
parents?

> /foo//bar//baz

This suggestion would also work.

> HOWEVER, in the end I decided that this doesn't make any difference. The
> "(deleted)" at the end is more human-readable, and as the name is really
> only for readability anyway. If you want to do machine-readability, it's a
> lot easier to do a "stat()" on the file and look at the i_nlink value
> (zero means it's deleted).

Mightn't there be other hard links to the file? The name it was opened
by (say, /usr/bin/ex) might have been deleted, but /usr/bin/vi and
/usr/bin/view might still work.

(H'm... as soon as I reboot, I'll have to try "ln /proc/self/fd/0 /tmp/foo < /tmp/bar", and the equivalent with a deleted file.)
--
-Colin

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.019 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site