From 32173e1c70dcb53470b0738ed4d0022388193113 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 20 Oct 2011 10:53:58 +0530 Subject: cluster/afr : Fix self-heal of special files Fixes self-heal of special files like device files, fifo files, socket files etc. Does it by doing the following: * Prevent setting of pending data xattr on a special file during entry self-heal when a new fils is created. * Allow data self-heal to be started on all file types other than directories. During data self-heal, for special files just erase pending xattrs, if those xattrs were set by previous releases of glusterfs. Change-Id: I34d8121e23ad00e85371ae2a36ef30cf3bd5db7a BUG: 3525 Reviewed-on: http://review.gluster.com/618 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr-self-heal-metadata.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index efc8412615f..c67748b2f8c 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -72,14 +72,6 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this) sh->op_failed = 1; sh->completion_cbk (frame, this); } else { - if (IA_ISREG (sh->type)) { - gf_log (this->name, GF_LOG_DEBUG, - "proceeding to data check on %s", - local->loc.path); - afr_self_heal_data (frame, this); - return 0; - } - if (IA_ISDIR (sh->type)) { gf_log (this->name, GF_LOG_DEBUG, "proceeding to entry check on %s", @@ -87,7 +79,10 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this) afr_self_heal_entry (frame, this); return 0; } - sh->completion_cbk (frame, this); + gf_log (this->name, GF_LOG_DEBUG, + "proceeding to data check on %s", + local->loc.path); + afr_self_heal_data (frame, this); } return 0; -- cgit