aboutsummaryrefslogtreecommitdiff
path: root/block/nbd-client.c
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2017-06-09 13:18:08 +0300
committerMax Reitz <mreitz@redhat.com>2017-06-26 14:54:46 +0200
commitf5a5ca796932d04cb2a1cb9382a55f72795b3e06 (patch)
tree4a34a4deddf9ab05de27ea83df28bcc03498fdc4 /block/nbd-client.c
parentc5f1ad429cdf26023cf331075a7d327708e3db6d (diff)
downloadqemu-f5a5ca796932d04cb2a1cb9382a55f72795b3e06.zip
qemu-f5a5ca796932d04cb2a1cb9382a55f72795b3e06.tar.gz
qemu-f5a5ca796932d04cb2a1cb9382a55f72795b3e06.tar.bz2
block: change variable names in BlockDriverState
Change the 'int count' parameter in *pwrite_zeros, *pdiscard related functions (and some others) to 'int bytes', as they both refer to bytes. This helps with code legibility. Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr> Message-id: 20170609101808.13506-1-el13635@mail.ntua.gr Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/nbd-client.c')
-rw-r--r--block/nbd-client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c
index d64e775..02e9281 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -259,14 +259,14 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
}
int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
- int count, BdrvRequestFlags flags)
+ int bytes, BdrvRequestFlags flags)
{
ssize_t ret;
NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES,
.from = offset,
- .len = count,
+ .len = bytes,
};
NBDReply reply;
@@ -316,13 +316,13 @@ int nbd_client_co_flush(BlockDriverState *bs)
return -reply.error;
}
-int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)
+int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes)
{
NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = {
.type = NBD_CMD_TRIM,
.from = offset,
- .len = count,
+ .len = bytes,
};
NBDReply reply;
ssize_t ret;