* 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x)
@ 2002-08-22 13:48 Trond Myklebust
2002-08-22 15:05 ` Jan Harkes
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2002-08-22 13:48 UTC (permalink / raw)
To: Alexander Viro; +Cc: linux-fsdevel
Al,
Is it safe for vfs_rmdir() (and in fact vfs_rename_dir()) to implicitly
assume that d_unhash() will always succeed in unhashing a dentry?
Shouldn't the VFS be rehashing those dentries if the d_mountpoint(dentry)
test or i_op->rmdir() itself causes us to exit with an error?
Cheers,
Trond
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x)
2002-08-22 13:48 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x) Trond Myklebust
@ 2002-08-22 15:05 ` Jan Harkes
2002-08-23 9:24 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Jan Harkes @ 2002-08-22 15:05 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Alexander Viro, linux-fsdevel
On Thu, Aug 22, 2002 at 03:48:01PM +0200, Trond Myklebust wrote:
> Is it safe for vfs_rmdir() (and in fact vfs_rename_dir()) to implicitly
> assume that d_unhash() will always succeed in unhashing a dentry?
>
> Shouldn't the VFS be rehashing those dentries if the d_mountpoint(dentry)
> test or i_op->rmdir() itself causes us to exit with an error?
Worst case scenario is that the underlying FS receives a new lookup for
the entry. Probably very useful when the dcache is slightly out of sync.
The rmdir might have failed because the directory doesn't exist in the
filesystem, so rehashing the dentry would be wrong.
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x)
2002-08-22 15:05 ` Jan Harkes
@ 2002-08-23 9:24 ` Trond Myklebust
0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2002-08-23 9:24 UTC (permalink / raw)
To: Jan Harkes; +Cc: Alexander Viro, linux-fsdevel
>>>>> " " == Jan Harkes <jaharkes@cs.cmu.edu> writes:
> Worst case scenario is that the underlying FS receives a new
> lookup for the entry. Probably very useful when the dcache is
> slightly out of sync.
But severely fscked up if the dentry is a mountpoint.
> The rmdir might have failed because the directory doesn't exist
> in the filesystem, so rehashing the dentry would be wrong.
Where's the big deal?
Either the dentry wasn't hashed in the first place (in which case a
simple test before you call d_unhash() can be used to tell you not to
rehash) or you will in any case need to have code in
lookup_revalidate() to cope with the alternative case "I've got a
hashed dentry that doesn't exist in the filesystem and I didn't call
rmdir()".
Cheers,
Trond
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-23 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-22 13:48 2 questions concerning vfs_rmdir() (2.4.x and 2.5.x) Trond Myklebust
2002-08-22 15:05 ` Jan Harkes
2002-08-23 9:24 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox