lib/nbd: Remove errno != EWOULDBLOCK in nbd_socket_rw
In this commit (a1d4a714b2
),
we refactor the code but introduce the new error comparison.
And it causes the hang issue in some cases for RPC, so remove
it.
Change-Id: I4da802dff24b7efc27dd25a05739f1def37c1486
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5767
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
01f2d0bd2d
commit
b48596efbc
@ -439,7 +439,7 @@ nbd_socket_rw(int fd, void *buf, size_t length, bool read_op)
|
|||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
return -EIO;
|
return -EIO;
|
||||||
} else if (rc == -1) {
|
} else if (rc == -1) {
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK) {
|
if (errno != EAGAIN) {
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user