diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-07-15 13:42:28 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-15 23:11:53 -0700 |
commit | 2be54585002cd1c9d02928b89a02047b58dd6aed (patch) | |
tree | acb75c82eb2b89a4b1986c35dc2cf58982afb128 /xlators/cluster/ec/src/ec-heal.c | |
parent | 3e1935c8141c4f0ff3ee5af30c62a02da772666b (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.
Change-Id: I459990c7df728ff4baf164df046672ddcde3efa5
BUG: 1122581
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8368
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heal.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-heal.c | 8 |
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; |