Re: DCACHE Pinning Problems with rm -r on 2.2.15/2.3.99Pre3 withNWFS2.2.2

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Thu Mar 30 2000 - 18:33:52 EST


Alexander Viro wrote:
>
> On Thu, 30 Mar 2000, Jeff V. Merkey wrote:
>
> > [.... However, I suspect that something like an address of entry might
> > be good enough. ...]
> >
> > Al,
> >
> > Please explain how I should implement this with an address of entry --
> > I'll get right on it. :-)
>
> OK, do you have _anything_ that would (a) stay constant and (b) would be
> easy for search? The underlying assumption in getdents() is that offsets
> stay constant - just as with the contents of file. I'm too lazy to look
> into the POSIX, but I suspect that it is in standards.
>
> Let's do it that way: could you describe the structure of your
> directories? Then I would probably be able to help with that.

Structure
---------

The directory is comprised of several components, all of which stay
around in memory:

1. Dir Block Hash (for rapid indexing of directory file offsets
128-byte aligned).
2. Name Hashes (1 per namespace per volume);
3. Parent Hash (this looks at lot like the dcache -- this is probably
where we should do what you suggest. Each parent hash has a hash chain
head that is persisent, but several directories might share it since it
hashes 4096 - 1 hash buckets. This is where I derive the child-parent
relatioships.
4. Dir Number hash (hash of all dir entries by positinal number IN THE
DIRECTOY FILE ITSELF).
Dir numbers are persistent but not always sequential).

I don't keep trees around. Each directory has an in-memory hash record
that also has links to the dir record number in the directory file and
trustees, quotas, namespace links, etc. I am storing the hash address
for each entry in the inode->generic_ip pointer.

Jeff

-
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.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:28 EST