diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2019-06-13 16:28:04 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-17 10:27:57 +0000 |
commit | 513df02b19af14b8b006c5c2e60c2a7447146aa2 (patch) | |
tree | fa96aac4e2d68a77c3491932bfda914f1b30f8fd /xlators | |
parent | 1984fddf10fd3ed8ddedfab45424db9656b271a8 (diff) |
glusterd: log error message only when rsp.op_ret is negative
Problem: commit d42221bec9 added a log message based on rsp.op_ret
check. but while running subdir-mount.t, this message is seen even on
successful mounts.
Solution: in __server_getspec(), return value of sys_read() is assigned to
ret, which will be a non-negative number in when sys_read() is success.
This non-zero value is assigned to rsp.op_ret. We should log an error only
when rsp.op_ret is negative.
fixes: bz#1718848
Change-Id: Ieef8ba33c2c7b4a97d4aef17543f58e66fd3b341
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index b51a8a8b7cf..f27b60513b7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1033,7 +1033,7 @@ fail: GF_FREE(brick_name); rsp.op_ret = ret; - if (rsp.op_ret) + if (rsp.op_ret < 0) gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_MOUNT_REQ_FAIL, "Failed to mount the volume"); |