Re: vfs

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Sun, 12 Jul 1998 08:18:06 +1000


Magnus Ahltorp writes:
> I'm writing a file system where entries are inserted into the dcache
> asynchronously in a different process from where the lookup is run.
>
> Therefore, in my inode installation routine, I do a d_alloc and get a
> new dentry and adds this to the dcache by calling d_add(dentry,
> inode). If the inode installation has been triggered by a lookup, that
> process will be woken up.
>
> The problem is, when lookup wakes up, I have to get the information
> (the inode) from the installed dentry (i get the dentry from
> d_lookup), kill that dentry and install my own (since lookup has to
> fill in a preallocated dentry). I have experimented alot with
> different ways to kill that dentry, but I have not found any way that
> works. The same problem arises in create.
>
> Is there a good way to kill this dentry? It should not be visible when
> doing a cached lookup, and it shouldn't be on the directory's hash
> table.

How about d_drop() ? Also, check out the FAQ listed below: it has a
link to my VFS primer.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html