[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fatfs virtual inodes

From: Marcus Brinkmann
Subject: Re: fatfs virtual inodes
Date: Thu, 1 May 2003 19:26:49 +0200
User-agent: Mutt/1.5.3i

On Thu, May 01, 2003 at 01:41:01AM +0200, marco@linuxrulez.nl wrote:
> Hi,
> Included with this mail is a patch for virt-inode.c. I have rewritten most
> of its code so it uses hash tables. Marcus and I talked about this and he
> made some notes about this (TODO in fatfs-0.4, in the top of virt-inode.c
> in CVS)... Is this what you wanted Marcus (IOW, does this solve the
> problems you had with this code)?

IIRC, the comment of NEW is targetted at a different problem, that of reusing
inode numbers instead just bumping the number up every time.  However,
reusing them might not be a smart idea anyway, given that there might be
programs that not only expect the inode numbers to be unique, but also not
jump around the filesystem all the time.  I think the only thing that is
saving us right now is the name cache of libdiskfs (which is only 200
elements big, so try ls -i on a directory with more than 200 files, and see
what happens to the inode numbers - I would expect the inode numbers to go
up by the numbers of files every time).

However, this is unrelated to the issue of using a hash table instead a
table.  If that is what your patch does (I only skimmed over it), and it
works, then that's great.  However, please use libihash instead your own,
unless you have some really good reason why not to.  Don't ask me why we
don't use libihash as the node cache in our filesystems, I don't know why.

And, use a prime number for the hash table size.  Also in inode.c, please (I
copied a non-prime from ext2fs at that time - only nfs was fixed, it seems). 
509 is a prime near 512.

> I also have a question about diskfs translators in the Hurd. There is a
> function called inode_init in inode.c in most diskfs translators. Is this
> code useless because the table will be initialized with 0's and who calls
> this function? Looks like dead code to me, but I have used this in this
> fatfs patch too be sure...

Seems to be useless. 

`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]