aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.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/sheepdog.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/sheepdog.c')
-rw-r--r--block/sheepdog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index c923667..a87ee5f 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2935,7 +2935,7 @@ static int sd_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
static coroutine_fn int sd_co_pdiscard(BlockDriverState *bs, int64_t offset,
- int count)
+ int bytes)
{
SheepdogAIOCB acb;
BDRVSheepdogState *s = bs->opaque;
@@ -2953,11 +2953,11 @@ static coroutine_fn int sd_co_pdiscard(BlockDriverState *bs, int64_t offset,
iov.iov_len = sizeof(zero);
discard_iov.iov = &iov;
discard_iov.niov = 1;
- if (!QEMU_IS_ALIGNED(offset | count, BDRV_SECTOR_SIZE)) {
+ if (!QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE)) {
return -ENOTSUP;
}
sd_aio_setup(&acb, s, &discard_iov, offset >> BDRV_SECTOR_BITS,
- count >> BDRV_SECTOR_BITS, AIOCB_DISCARD_OBJ);
+ bytes >> BDRV_SECTOR_BITS, AIOCB_DISCARD_OBJ);
sd_co_rw_vector(&acb);
sd_aio_complete(&acb);