[Tux3] Towards an api for editing extents in dleaves

Daniel Phillips phillips at phunq.net
Sun Sep 21 16:51:57 PDT 2008


I checked in a completely untested prototype of dwalk_pack, the purpose
of which is to pack extents into the (somewhat tricky) dleaf format one
at a time, with the aim of presenting a much simpler interface to users
of dleaves (inode.c) than editing the dleaf format directly:

   http://tux3.org/tux3?fd=4ef501450a04;file=user/test/dleaf.c

Anybody want to take a run at writing some unit testing code for this,
similar to the existing unit test for dwalk_next?  I am sure dwalk_pack
mostly consists of bugs at this point, but that is just the way all
such useful little gizmos start off.  One possible unit test would start
by creating an empty dleaf, then packing a number of extents into it
in ascending key (logical address) order.  Some setup code for the
struct dwalk would need to be written.  Another form of unit test would
start with an existing, populated dleaf, then dleaf_pack some additional
entries onto the end of it, again in key order.

Regards,

Daniel

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



More information about the Tux3 mailing list