[Tux3] symlink, truncate, unlink, link, and some bug fixes

Daniel Phillips phillips at phunq.net
Sun Dec 7 04:36:24 PST 2008

On Sunday 07 December 2008 03:47, OGAWA Hirofumi wrote:
> Those patches fix some bugs, and adds new handlers ->symlink(),
> ->truncate(), ->delete_inode(), ->unlink(), and ->link().
> There are some bugs, e.g. purge_inum() doesn't truncate bnode/ileaf
> itself. And we don't free blocks on delete/truncate (need to implement
> free_block()). Those have to be fixed soon or later.
> 	static-http://userweb.kernel.org/~hirofumi/tux3/
> Please review it.

It all looks beautiful, and as usual, it builds cleanly, passes all the
tests, boots up and mounts without problems.  I did not test the new
functionality yet.  Pushed to public.

One idea on the links count attribute: as a later optimization, how
about we store it only if it is not equal to one?  That is the majority
of cases.  Saving the 6 bytes of link count attribute for most files
will reduce our average inode size by 12% or so.  I previously
suggested we interpret a missing links attribute as zero, but that is a
rare case (orphan and internal inodes).  We should just store the
attribute then.

Link count for a directory is always 2 + number of subdirectories.
What about storing one less than the directory link count, so that
the stored link count for a directory with no children is one, which
is most directories?  Then we also would not have to store the size
attribute for a directory.

Very small optimizations, I know.


Tux3 mailing list
Tux3 at tux3.org

More information about the Tux3 mailing list