diff options
author | zhangxyue <77471026+zhangxyue@users.noreply.github.com> | 2021-02-22 04:05:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 17:35:28 +0530 |
commit | 839e4796d2ea92a97001d1af34837467da4a05cd (patch) | |
tree | bdec8c48ece959268c3e29293226f20b4a53f8df /xlators | |
parent | adf95699621f084f2503d8dd15e519bab778906f (diff) | |
download | glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.tar.gz glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.tar.xz glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.zip |
glusterfs:the mount operation will get stuck when the vol isn't exist (#2177)
when passing wrong volume-name which doesn't exits, it will get stuck.
The errno is 0 inited in glusterd-handshake.c. After initing the errno,
the process blocks in gf_fuse_umount.
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index e831c1a3c5..cd4d507dc1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1119,9 +1119,12 @@ fail: GF_FREE(brick_name); rsp.op_ret = ret; - if (rsp.op_ret < 0) + if (rsp.op_ret < 0) { gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_MOUNT_REQ_FAIL, "Failed to mount the volume"); + if (!op_errno) + op_errno = ENOENT; + } if (op_errno) rsp.op_errno = gf_errno_to_error(op_errno); |