Bug 1266882 - RFE: posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY' implementation
RFE: posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY' implementation
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: quota (Show other bugs)
3.7.5
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vijaikumar Mallikarjuna
:
Depends On: 1243946
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-28 07:24 EDT by Vijaikumar Mallikarjuna
Modified: 2016-05-11 18:48 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.7.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1243946
Environment:
Last Closed: 2015-10-14 06:28:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vijaikumar Mallikarjuna 2015-09-28 07:24:54 EDT
+++ This bug was initially created as a clone of Bug #1243946 +++

implementation of xattrop type
GF_XATTROP_ADD_DEF_ARRAY
GF_XATTROP_ADD_DEF_ARRAY64

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;
};

xattrop GF_XATTROP_ADD_ARRAY
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
    else
        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;
};

--- Additional comment from Anand Avati on 2015-07-16 12:31:07 EDT ---

REVIEW: http://review.gluster.org/11702 (posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY' implementation) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika@redhat.com)

--- Additional comment from Anand Avati on 2015-07-16 12:36:30 EDT ---

REVIEW: http://review.gluster.org/11702 (posix: xattrop 'GF_XATTROP_ADD_DEF_ARRAY' implementation) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika@redhat.com)

--- Additional comment from Anand Avati on 2015-08-20 05:53:34 EDT ---

REVIEW: http://review.gluster.org/11702 (posix: xattrop 'GF_XATTROP_ADD_ARRAY_WITH_DEFAULT' implementation) posted (#3) for review on master by Vijaikumar Mallikarjuna (vmallika@redhat.com)
Comment 1 Vijaikumar Mallikarjuna 2015-09-28 07:29:06 EDT
Patch submitted: http://review.gluster.org/#/c/12241/
Comment 2 Pranith Kumar K 2015-10-14 06:28:00 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-glusterfs-3.7.5, please open a new bug report.

glusterfs-glusterfs-3.7.5 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://www.gluster.org/pipermail/gluster-users/2015-October/023968.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user
Comment 3 Pranith Kumar K 2015-10-14 06:37:35 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.5, please open a new bug report.

glusterfs-3.7.5 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://www.gluster.org/pipermail/gluster-users/2015-October/023968.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Note You need to log in before you can comment on or make changes to this bug.