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>
This commit is contained in:
parent
3e1935c814
commit
2be5458500
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user