[Pvfs2-developers] patches: directory hints
Phil Carns
pcarns at wastedcycles.org
Mon Jun 12 11:21:37 EDT 2006
These patches are based on part of the functionality Murali originally
contributed in this email thread:
http://www.beowulf-underground.org/pipermail/pvfs2-developers/2005-November/001624.html
This does not include any of the provenance support. It just allows you
to modify distribution, distribution parameters, and number of datafiles
to use for a given directory. These settings will only impact the
creation of future files within the directory; it does not change
parameters for existing files.
Examples:
[user at node]$ setfattr -n "user.pvfs2.num_dfiles" -v "1" /mnt/pvfs2/directory
[user at node]$ setfattr -n "user.pvfs2.dist_name" -v "basic_dist"
/mnt/pvfs2/directory
[user at node]$ setfattr -n "user.pvfs2.dist_params" -v "strip_size:4096"
/mnt/pvfs2/directory
Use of this patch requires a bump in protocol major version, because it
changes existing protocol structures. These fields are set as extended
attributes. They can also be read as extended attributes. However,
they are also reported as part of the normal pvfs2 attributes for
directories (as hints) if the appropriate attr mask is set.
keyval-read-list-partial.patch:
----------------
This patch seperates out the functionality necessary to support partial
success when reading a list of xattrs from PVFS2. This is required by
the following patch so that you can check for the presence of several
xattrs in one access. It modifies both the dbpf keyval_read_list()
function and the system interface geteattr() function. They now return
an array of completely independent error codes for each key that is read
(or not read, as the case may be).
dir-hint.patch:
----------------
This implements the directory hints that allow you to specify
distribution, distribution parameters, and number of key files on a
directory level. There are a few changes from Murali's original version:
- hints are inherited by newly created subdirectories
- all xattrs related to these features stored are in the user.pvfs2.
namespace
- error handling has been cleaned up a little
- the client side sys_create() function uses the generic distribution
parameter functions for parsing parameters, rather than having special
case logic for the "strip_size" parameter. This mirrors how the server
handles distribution parameters in fs.conf file.
- cleaned up use of the directory hint mask a little bit and made sure
that the directory hints are not requested in any places that they
aren't needed.
limit-getattr-mask.patch:
----------------
This patch isn't directly related to the previous two, but it applies
more cleanly if the above are in place because of changes in the getattr
state machine. Basically there was a bug in the getattr state machine
that would cause it to read the dirent_count most of the time regardless
of the attribute mask requested by the client. This patch makes sure
that the dirent_count step is skipped if the client doesn't want that
value.
The limit-getattr-mask.patch also adjusts the encode_string() macro to
make it safe to call on NULL strings when encoding request or response
structures.
-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dir-hint.patch
Type: text/x-patch
Size: 51217 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060612/3dc2cbe1/dir-hint-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keyval-read-list-partial.patch
Type: text/x-patch
Size: 15649 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060612/3dc2cbe1/keyval-read-list-partial-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: limit-getattr-mask.patch
Type: text/x-patch
Size: 3068 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060612/3dc2cbe1/limit-getattr-mask-0001.bin
More information about the Pvfs2-developers
mailing list