[Pvfs2-developers] md on md, dbpf attr cache, rmw, etc.
Sam Lang
slang at mcs.anl.gov
Wed May 16 15:26:35 EDT 2007
Hi All,
I've been working on some changes recently to the DBPF
implementation. There some bits of the code that I've tried to
cleanup, which I've tried to separate out in the attached patch.
Please let me know what you think of these changes. Here are the
gory details:
* There are attributes on some objects which differ based on the type
of object, but need to be stored outside the keyval space.
Essentially, this is metadata on metadata. For example, the metadata
objects have the distribution size and the number of datafile
handles, both of which vary from object to object, and we need to
know those sizes before doing a keyval_read. We store these size
parameters in the dspace entry for the object. Similarly, the
dirdata object has a number of directory entries. We were previously
storing this value in a special "null" entry at the beginning of the
sub-space for that handle's set of keyval entries. This worked, but
was always a bit of a hack. The changes I've made gets rid of the
keyval_handle_info, and stores all metadata-on-metadata in a union at
the end of the dspace attributes. This has the side affect of
allowing us to get rid of the TROVE_ds_storedattr_s struct and just
have one structure for storing and accessing dspace attributes.
* I changed the dbpf-attr-cache implementation to use our generic
tcache (i.e. timeout cache -- in this case the timeout is
infinity :-)). There are now separate cache instances for dspace
entries and keyval entries. At present it still only caches keyval
entries with certain keywords specified -- so directory entries don't
get cached.
* Related to the above two bullets, I've added a per-handle mutex to
the attribute cache. This is needed to do read-modify-write on the
the count of directory entries for each time a dirent is added or
removed. This should allow us to do fine grained locks on a per-
handle basis in cases like this where its needed.
Thanks,
-sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbpf-changes.patch
Type: application/octet-stream
Size: 151240 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20070516/63801b64/dbpf-changes-0001.obj
More information about the Pvfs2-developers
mailing list