diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2017-06-09 13:18:08 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-06-26 14:54:46 +0200 |
commit | f5a5ca796932d04cb2a1cb9382a55f72795b3e06 (patch) | |
tree | 4a34a4deddf9ab05de27ea83df28bcc03498fdc4 /block/block-backend.c | |
parent | c5f1ad429cdf26023cf331075a7d327708e3db6d (diff) |
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/block-backend.c')
-rw-r--r-- | block/block-backend.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index a2bbae90b1..0df3457a09 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1099,9 +1099,9 @@ int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf, } int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags) + int bytes, BdrvRequestFlags flags) { - return blk_prw(blk, offset, NULL, count, blk_write_entry, + return blk_prw(blk, offset, NULL, bytes, blk_write_entry, flags | BDRV_REQ_ZERO_WRITE); } @@ -1311,10 +1311,10 @@ static void blk_aio_pdiscard_entry(void *opaque) } BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk, - int64_t offset, int count, + int64_t offset, int bytes, BlockCompletionFunc *cb, void *opaque) { - return blk_aio_prwv(blk, offset, count, NULL, blk_aio_pdiscard_entry, 0, + return blk_aio_prwv(blk, offset, bytes, NULL, blk_aio_pdiscard_entry, 0, cb, opaque); } @@ -1374,14 +1374,14 @@ BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf, return blk_aio_prwv(blk, req, 0, &qiov, blk_aio_ioctl_entry, 0, cb, opaque); } -int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count) +int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int bytes) { - int ret = blk_check_byte_request(blk, offset, count); + int ret = blk_check_byte_request(blk, offset, bytes); if (ret < 0) { return ret; } - return bdrv_co_pdiscard(blk_bs(blk), offset, count); + return bdrv_co_pdiscard(blk_bs(blk), offset, bytes); } int blk_co_flush(BlockBackend *blk) @@ -1760,9 +1760,9 @@ void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, } int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags) + int bytes, BdrvRequestFlags flags) { - return blk_co_pwritev(blk, offset, count, NULL, + return blk_co_pwritev(blk, offset, bytes, NULL, flags | BDRV_REQ_ZERO_WRITE); } @@ -1789,9 +1789,9 @@ static void blk_pdiscard_entry(void *opaque) rwco->ret = blk_co_pdiscard(rwco->blk, rwco->offset, rwco->qiov->size); } -int blk_pdiscard(BlockBackend *blk, int64_t offset, int count) +int blk_pdiscard(BlockBackend *blk, int64_t offset, int bytes) { - return blk_prw(blk, offset, NULL, count, blk_pdiscard_entry, 0); + return blk_prw(blk, offset, NULL, bytes, blk_pdiscard_entry, 0); } int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, |