aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-10-06 15:17:17 +0200
committerEric Blake <eblake@redhat.com>2021-10-15 15:59:26 -0500
commit14149710f98fcf7af13eeb6cf6040b33c01b9792 (patch)
tree4465825d3cc847011081d935b38b7e33f331297d /block
parenta93d81c84afa717b0a1a6947524d8d1fbfd6bbf5 (diff)
downloadqemu-14149710f98fcf7af13eeb6cf6040b33c01b9792.zip
qemu-14149710f98fcf7af13eeb6cf6040b33c01b9792.tar.gz
qemu-14149710f98fcf7af13eeb6cf6040b33c01b9792.tar.bz2
block-backend: blk_pread, blk_pwrite: rename count parameter to bytes
To be consistent with declarations in include/sysemu/block-backend.h. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211006131718.214235-12-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/block-backend.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index c889d0f..59746ed 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1477,27 +1477,27 @@ BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset,
flags | BDRV_REQ_ZERO_WRITE, cb, opaque);
}
-int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count)
+int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int bytes)
{
int ret;
- QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, count);
+ QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
blk_inc_in_flight(blk);
- ret = blk_do_preadv(blk, offset, count, &qiov, 0);
+ ret = blk_do_preadv(blk, offset, bytes, &qiov, 0);
blk_dec_in_flight(blk);
- return ret < 0 ? ret : count;
+ return ret < 0 ? ret : bytes;
}
-int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count,
+int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int bytes,
BdrvRequestFlags flags)
{
int ret;
- QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, count);
+ QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
- ret = blk_pwritev_part(blk, offset, count, &qiov, 0, flags);
+ ret = blk_pwritev_part(blk, offset, bytes, &qiov, 0, flags);
- return ret < 0 ? ret : count;
+ return ret < 0 ? ret : bytes;
}
int64_t blk_getlength(BlockBackend *blk)