summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.h
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-04-25 15:58:09 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-05-08 15:05:30 -0700
commitf54b232b3cc61ee9ca76288958537b53de64de53 (patch)
tree3d71601a2bc3422c062c9657d16ca02aacdb4263 /xlators/cluster/ec/src/ec-common.h
parentfae1e70ff3309d2b64febaafc70abcaa2771ecf0 (diff)
cluster/ec: data heal implementation for ec
Data self-heal: 1) Take inode lock in domain 'this->name:self-heal' on 0-0 range (full file), So that no other processes try to do self-heal at the same time. 2) Take inode lock in domain 'this->name' on 0-0 range (full file), 3) perform fxattrop+fstat and get the xattrs on all the bricks 3) Choose the brick with ec->fragment number of same version as source 4) Truncate sinks 5) Unlock lock taken in 2) 5) For each block take full file lock, Read from sources write to the sinks, Unlock 6) Take full file lock and see if the file is still sane copy i.e. File didn't become unusable while the bricks are offline. Update mtime to before healing 7) xattrop with -ve values of 'dirty' and difference of highest and its own version values for version xattr 8) unlock lock acquired in 6) 9) unlock lock acquired in 1) Change-Id: I6f4d42cd5423c767262c9d7bb5ca7767adb3e5fd BUG: 1216303 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10384 Reviewed-on: http://review.gluster.org/10692 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.h')
-rw-r--r--xlators/cluster/ec/src/ec-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
index ba009040b71..04f85a43f16 100644
--- a/xlators/cluster/ec/src/ec-common.h
+++ b/xlators/cluster/ec/src/ec-common.h
@@ -31,6 +31,8 @@ typedef enum {
#define EC_FLAG_WAITING_WINDS 0x0010
+#define EC_SELFHEAL_BIT 62
+
#define EC_MINIMUM_ONE -1
#define EC_MINIMUM_MIN -2
#define EC_MINIMUM_ALL -3