[Tux3] link_ improvement, cleanup, small fixes, and btree_inode()

Daniel Phillips phillips at phunq.net
Sat Jan 24 03:00:35 PST 2009


On Friday 23 January 2009 15:18, OGAWA Hirofumi wrote:
> Hi,
> 
> This is mainly cleanups. Introduce btree_inode() to know the block
> referencing btree from btree, link_*() improvement, small fixes.
> 
> Those patches are passed fsx-linux test for 26 hours, the tree was
> including delalloc and vol_bread patches though :)
> 
> 	static-http://userweb.kernel.org/~hirofumi/tux3/
> 
> Please review and pull if ok.
> 
> Thanks.

OK, pulled, and I rewrote the deferred free code again... now it is
called "stash".  Its purpose is to stash binary sized values in pages,
only remembering the number of elements in the final page in the queue,
a little like the logging support, except logging does serial encoding
of endian data in blocks meant for transfer to disk.

This will be used in three places: one deferred free list for deltas
and another for metadata flushing (these are on different cycles) and
for bookkeeping during log replay.

Improvements:

  * There is now a "struct stash" as a handle for a stash, which cleans
    up the messy superblock variables and supports multiple stashes.

  * The only init required is to clear the struct stash, so there is
    no stash_init.

  * Empty queues are now allowed, though that should never occur except
    at start.

  * No special extent struct for the interface, details of encoding are
    private to stash_free and retire_frees.

  * Stash primitives don't know anything about Tux3, so it could be
    generic if somebody else had a use...

  * Error handling added.

SMP synchronization is missing.  It should be a spinlock in the stash
struct I suppose, or a mutex just for now.

Regards,

Daniel

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list