[Bugs] [Bug 1243946] New: RFE: posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY' implementation

bugzilla at redhat.com bugzilla at redhat.com
Thu Jul 16 16:17:10 UTC 2015


            Bug ID: 1243946
           Summary: RFE: posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY'
           Product: GlusterFS
           Version: mainline
         Component: quota
          Assignee: bugs at gluster.org
          Reporter: vmallika at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com

implementation of xattrop type

These operations are similar to 'GF_XATTROP_ADD_ARRAY',
except that it adds a default value if xattr is missing
or its value is zero on disk.

One use-case of this operation is in inode-quota.
When a new directory is created, its default dir_count
should be set to 1. So when a xattrop performed setting
inode-xattrs, it should account initial dir_count
1 if the xattrs are not present

Here is the usage of this operation

value required in xdata for each key 
struct array {
    int32_t   newvalue_1;
    int32_t   default_1;
    int32_t   newvalue_2;
    int32_t   default_2;
    int32_t   newvalue_n;
    int32_t   default_n;

for i from 1 to n
    if (xattr (dest_i) is zero or not set in the disk)
        dest_i = dest_i + newvalue_i + default_i
        dest_i = dest_i + newvalue_i

value in xdata after xattrop is successful
struct array {
    int32_t   dest_1;
    int32_t   dest_2;
    int32_t   dest_n;

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list