diff options
author | Eric Blake <eblake@redhat.com> | 2016-05-06 10:26:28 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-12 15:22:08 +0200 |
commit | b7d17f9fa4df83ed060168c450889d73c441c8f6 (patch) | |
tree | 1e3440c0129ba315811ff15d1c4d917b0551e41d /block/block-backend.c | |
parent | 8341f00dc207b80a1b2e7c7784890c9b0446d062 (diff) |
block: Switch blk_read_unthrottled() to byte interface
Sector-based blk_read() should die; convert the one-off
variant blk_read_unthrottled().
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/block-backend.c')
-rw-r--r-- | block/block-backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 96c1d7c445..e5a8a0734f 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -790,19 +790,19 @@ int blk_read(BlockBackend *blk, int64_t sector_num, uint8_t *buf, return blk_rw(blk, sector_num, buf, nb_sectors, blk_read_entry, 0); } -int blk_read_unthrottled(BlockBackend *blk, int64_t sector_num, uint8_t *buf, - int nb_sectors) +int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf, + int count) { BlockDriverState *bs = blk_bs(blk); int ret; - ret = blk_check_request(blk, sector_num, nb_sectors); + ret = blk_check_byte_request(blk, offset, count); if (ret < 0) { return ret; } bdrv_no_throttling_begin(bs); - ret = blk_read(blk, sector_num, buf, nb_sectors); + ret = blk_pread(blk, offset, buf, count); bdrv_no_throttling_end(bs); return ret; } |