diff options
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 13825e1ebad..7f5095e2ada 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -178,6 +178,13 @@ __afr_selfheal_heal_dirent (call_frame_t *frame, xlator_t *this, fd_t *fd,  	if (!replies[source].valid)  		return -EIO; +        /* Skip healing this entry if the last lookup on it failed for reasons +         * other than ENOENT. +         */ +        if ((replies[source].op_ret < 0) && +            (replies[source].op_errno != ENOENT)) +                return -replies[source].op_errno; +  	for (i = 0; i < priv->child_count; i++) {  		if (!healed_sinks[i])  			continue; @@ -193,7 +200,7 @@ __afr_selfheal_heal_dirent (call_frame_t *frame, xlator_t *this, fd_t *fd,  			ret = afr_selfheal_recreate_entry (this, i, source,  							   fd->inode, name, inode,  							   replies, newentry); -		} +                }  		if (ret < 0)  			break;  	}  | 
