summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-07-15 13:42:28 +0200
committerVijay Bellur <vbellur@redhat.com>2014-09-16 10:13:59 -0700
commit7fe574039815ad1339851eb0dc9f2366b02ceddf (patch)
tree059d52e1896598a46ebf0773d322ec89b9c0be77
parentd18b830fb78a141f4c38a40be7c470485b9250ea (diff)
ec: Only heal data/metadata when inode has enough information
Sometimes loc_t structure in a heal request doesn't contain enough information to do an inodelk call (basically the gfid is missing). In these cases, self heal only recovers entry information. This is a backport of http://review.gluster.org/8368/ Change-Id: I459990c7df728ff4baf164df046672ddcde3efa5 BUG: 1140626 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8747 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
-rw-r--r--xlators/cluster/ec/src/ec-heal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index f6ee0076373..107ff5ffe3d 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -1183,6 +1183,14 @@ int32_t ec_manager_heal(ec_fop_data_t * fop, int32_t state)
return EC_STATE_HEAL_PRE_INODELK_LOCK;
case EC_STATE_HEAL_PRE_INODELK_LOCK:
+ // Only heal data/metadata if enough information is supplied.
+ if (uuid_is_null(heal->loc.gfid))
+ {
+ ec_heal_entrylk(heal, ENTRYLK_UNLOCK);
+
+ return EC_STATE_HEAL_DISPATCH;
+ }
+
ec_heal_inodelk(heal, F_WRLCK, 0, 0, 0);
return EC_STATE_HEAL_PRE_INODE_LOOKUP;