lib/nbd: Remove errno != EWOULDBLOCK in nbd_socket_rw

In this commit (a1d4a714b25aa26068e3e3e686dfd2c1283164df),
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:
Ziye Yang 2021-01-05 19:25:17 +08:00 committed by Tomasz Zawadzki
parent 01f2d0bd2d
commit b48596efbc

View File

@ -439,7 +439,7 @@ nbd_socket_rw(int fd, void *buf, size_t length, bool read_op)
if (rc == 0) {
return -EIO;
} else if (rc == -1) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
if (errno != EAGAIN) {
return -errno;
}
return 0;