Skip to content

Commit 1414971

Browse files
Vladimir Sementsov-Ogievskiyebblake
authored andcommitted
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 <[email protected]> Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Eric Blake <[email protected]>
1 parent a93d81c commit 1414971

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

block/block-backend.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,27 +1477,27 @@ BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset,
14771477
flags | BDRV_REQ_ZERO_WRITE, cb, opaque);
14781478
}
14791479

1480-
int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count)
1480+
int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int bytes)
14811481
{
14821482
int ret;
1483-
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, count);
1483+
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
14841484

14851485
blk_inc_in_flight(blk);
1486-
ret = blk_do_preadv(blk, offset, count, &qiov, 0);
1486+
ret = blk_do_preadv(blk, offset, bytes, &qiov, 0);
14871487
blk_dec_in_flight(blk);
14881488

1489-
return ret < 0 ? ret : count;
1489+
return ret < 0 ? ret : bytes;
14901490
}
14911491

1492-
int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count,
1492+
int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int bytes,
14931493
BdrvRequestFlags flags)
14941494
{
14951495
int ret;
1496-
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, count);
1496+
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
14971497

1498-
ret = blk_pwritev_part(blk, offset, count, &qiov, 0, flags);
1498+
ret = blk_pwritev_part(blk, offset, bytes, &qiov, 0, flags);
14991499

1500-
return ret < 0 ? ret : count;
1500+
return ret < 0 ? ret : bytes;
15011501
}
15021502

15031503
int64_t blk_getlength(BlockBackend *blk)

0 commit comments

Comments
 (0)