Re: ext2fs enhacement/fix [re: shrinking directories]

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Sat, 18 Jul 1998 00:36:54 +0200


>
> I wonder if inodes simply being "packed" would be better (or not?) than a
> whole pack/shrink cycle. You could impliment a pack pretty quickly and easily
> when looking for your inode.
> looking for my inode
> found a hole (remember it)
> ....
> found 50 or (n) holes -- I'll shove my inode when I find it in the
> first hole.
> ....
> inode found, mv to first hole.
>
> That should be relativly quick and doesn't require an extra program or
> thread (unless you want to regain that space at some point). (I don't know
> if this would otherwise violate locking or handling and cause more problems.)
>
I think that in the previous text you meant directory_entry instead of inode
(in the other case the text doesn't make sence to me). The problem with your
solution is that you will change the order of the entries which may introduce
problems with for example readdir... (You could skip some entry.) To make
it safe you have to do some locking of directory which can slow things a lot...

Bye Honza.

-
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