提交 6faa0777 编写于 作者: V Vladimir Sementsov-Ogievskiy 提交者: Eric Blake

block/nbd-client: get rid of ssize_t

Use int variable for nbd_co_send_request return value (as
nbd_co_send_request returns int).
Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-6-vsementsov@virtuozzo.com>
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 490dc5ed
...@@ -230,7 +230,7 @@ int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset, ...@@ -230,7 +230,7 @@ int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset,
.len = bytes, .len = bytes,
}; };
NBDReply reply; NBDReply reply;
ssize_t ret; int ret;
assert(bytes <= NBD_MAX_BUFFER_SIZE); assert(bytes <= NBD_MAX_BUFFER_SIZE);
assert(!flags); assert(!flags);
...@@ -254,7 +254,7 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset, ...@@ -254,7 +254,7 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
.len = bytes, .len = bytes,
}; };
NBDReply reply; NBDReply reply;
ssize_t ret; int ret;
if (flags & BDRV_REQ_FUA) { if (flags & BDRV_REQ_FUA) {
assert(client->info.flags & NBD_FLAG_SEND_FUA); assert(client->info.flags & NBD_FLAG_SEND_FUA);
...@@ -275,7 +275,7 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset, ...@@ -275,7 +275,7 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
int bytes, BdrvRequestFlags flags) int bytes, BdrvRequestFlags flags)
{ {
ssize_t ret; int ret;
NBDClientSession *client = nbd_get_client_session(bs); NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = { NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES, .type = NBD_CMD_WRITE_ZEROES,
...@@ -310,7 +310,7 @@ int nbd_client_co_flush(BlockDriverState *bs) ...@@ -310,7 +310,7 @@ int nbd_client_co_flush(BlockDriverState *bs)
NBDClientSession *client = nbd_get_client_session(bs); NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = { .type = NBD_CMD_FLUSH }; NBDRequest request = { .type = NBD_CMD_FLUSH };
NBDReply reply; NBDReply reply;
ssize_t ret; int ret;
if (!(client->info.flags & NBD_FLAG_SEND_FLUSH)) { if (!(client->info.flags & NBD_FLAG_SEND_FLUSH)) {
return 0; return 0;
...@@ -337,7 +337,7 @@ int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) ...@@ -337,7 +337,7 @@ int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes)
.len = bytes, .len = bytes,
}; };
NBDReply reply; NBDReply reply;
ssize_t ret; int ret;
if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) { if (!(client->info.flags & NBD_FLAG_SEND_TRIM)) {
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册