summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-types.h
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2017-07-31 12:45:21 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-10-16 02:40:01 +0000
commitd88be3bc29dbd1eaa393802f3c98e188fe5287c8 (patch)
tree6f0b6648e1882761d755fc28ae7fd0c803305c7d /xlators/cluster/ec/src/ec-types.h
parent067f38063e13fc75d4e3f7adf93441d15099c557 (diff)
cluster/ec: Improve heal info command to handle obvious cases
Problem: 1 - If a brick is down and we see an index entry in .glusterfs/indices, we should show it in heal info output as it most certainly needs heal. 2 - The first problem is also not getting handled after ec_heal_inspect. Even if in ec_heal_inspect, lookup will mark need_heal as true, we don't handle it properly in ec_get_heal_info and continue with locked inspect which takes lot of time. Solution: 1 - In first case we need not to do any further invstigation. As soon as we see that a brick is down, we should say that this index entry needs heal for sure. 2 - In second case, if we have need_heal as _gf_true after ec_heal_inspect, we should show it as heal requires. Change-Id: Ibe7f9d7602cc0b382ba53bddaf75a2a2c3326aa6 BUG: 1476668 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-types.h')
-rw-r--r--xlators/cluster/ec/src/ec-types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h
index d771741f0ac..94ac911238e 100644
--- a/xlators/cluster/ec/src/ec-types.h
+++ b/xlators/cluster/ec/src/ec-types.h
@@ -17,6 +17,9 @@
#define EC_GF_MAX_REGS 16
+enum _ec_heal_need;
+typedef enum _ec_heal_need ec_heal_need_t;
+
enum _ec_read_policy;
typedef enum _ec_read_policy ec_read_policy_t;
@@ -115,6 +118,12 @@ enum _ec_read_policy {
EC_READ_POLICY_MAX
};
+enum _ec_heal_need {
+ EC_HEAL_NONEED,
+ EC_HEAL_MAYBE,
+ EC_HEAL_MUST
+};
+
struct _ec_config {
uint32_t version;
uint8_t algorithm;