cluster/dht: ENOSPC will not fail rebalance

ENOSPC returned by a file migration is no longer
considered a rebalance failure.

Change-Id: I21cf3a8acdc827bc478e138d6cb5db649d53a28c
fixes: bz#1553598
Signed-off-by: N Balachandran <nbalacha@redhat.com>
This commit is contained in:
N Balachandran 2018-03-26 10:56:51 +05:30 committed by Raghavendra G
parent 04ede2e163
commit 95601229b8

View File

@ -2521,9 +2521,9 @@ int32_t
gf_defrag_handle_migrate_error (int32_t op_errno, gf_defrag_info_t *defrag)
{
int ret = 0;
/* if errno is not ENOSPC or ENOTCONN, we can still continue
/* if errno is not ENOTCONN, we can still continue
with rebalance process */
if ((op_errno != ENOSPC) && (op_errno != ENOTCONN)) {
if (op_errno != ENOTCONN) {
ret = 1;
goto out;
}
@ -2537,10 +2537,6 @@ gf_defrag_handle_migrate_error (int32_t op_errno, gf_defrag_info_t *defrag)
goto out;
}
if (op_errno == ENOSPC) {
ret = -1;
}
out:
return ret;
}