From ff4b227910903b0958bdd5437d6d93ddb54919ce Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 5 Sep 2012 20:16:52 +0530 Subject: storage/posix: Add or_array/and_array op for xattrop Problem: For set/reset of outcast (ALL changelog bits set per transaction type i.e. data/mdata/entry) from afr the capability of OR/AND in xattrop is needed in posix. Otherwise marking outcast will only be possible in self-heals where appropriate locks are held so that no other transaction is in progress, so exact number can be computed with which when XATTROP_ADD happens all bits will be set for that changelog. Fix: Implemented new xattrop-op OR_ARRAY, AND_ARRAY. Made checks in __add_array to work well with __or_array. Tests: From Afr code made an OR_ARRAY with ALL bits set and it reflected on the changelog xattrs. changelog incrementing did not have any effects on the all-set changelog. From Afr code made an AND_ARRAY with 0 and it reflected in the changelog xattrs. Change-Id: Ie89c78a43d05789e3a8fa03d2422b52083ae80b9 BUG: 847671 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/3909 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/glusterfs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/glusterfs.h') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 622651b4c..56fbbaff2 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -249,7 +249,9 @@ typedef enum { typedef enum { GF_XATTROP_ADD_ARRAY, - GF_XATTROP_ADD_ARRAY64 + GF_XATTROP_ADD_ARRAY64, + GF_XATTROP_OR_ARRAY, + GF_XATTROP_AND_ARRAY } gf_xattrop_flags_t; -- cgit