Hi Marcus,

> 3. Making up inode numbers on the way:
> Simply start with 1 and go up for every new file cached. This could be
> called "virtual inodes". The problem is that there is per se no efficient way
> to regain the virtual inode numbers from the file information, when looking it
> up (The answer to the question: Do we have the file "foobar" in the cache?).
> So, this violates the meaningfulness of the cache_id, but, as it turns out,
> in a repairable way.

This `sounds' like a linked list implementation.  Why not a hash
function.  This also makes the reverse lookup relatively trivial.
>From the sounds of it, bucket hashes would be most appropriate so
that the hash table can grow without to much work.

> It turns out that a filesystem with simple data structures can be more
> complicated to implement. We learn that adding a bit complexity to the data
> structures (like inodes) can lead to more efficient and easier to implement
> operations on the data. ;)

Interesting insight.

-Neal

-- 
----------------------------------------------------------------------------
Neal Walfield                                              [EMAIL PROTECTED]
UMass Lowell - Fox 1512                                  Phone: 978-934-5347
                                                           Fax: 603-415-3645
Love is the triumph of imagination over intelligence.
                -- H. L. Mencken

Reply via email to