mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
block: Switch blk_*write_zeroes() to byte interface
Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes() to use an offset/count interface instead. Likewise for blk_co_write_zeroes() and blk_aio_write_zeroes(). Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
b7d17f9fa4
commit
983a160050
6 changed files with 25 additions and 36 deletions
|
@ -96,10 +96,10 @@ int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
|
|||
int count);
|
||||
int blk_write(BlockBackend *blk, int64_t sector_num, const uint8_t *buf,
|
||||
int nb_sectors);
|
||||
int blk_write_zeroes(BlockBackend *blk, int64_t sector_num,
|
||||
int nb_sectors, BdrvRequestFlags flags);
|
||||
BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
|
||||
int nb_sectors, BdrvRequestFlags flags,
|
||||
int blk_write_zeroes(BlockBackend *blk, int64_t offset,
|
||||
int count, BdrvRequestFlags flags);
|
||||
BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t offset,
|
||||
int count, BdrvRequestFlags flags,
|
||||
BlockCompletionFunc *cb, void *opaque);
|
||||
int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count);
|
||||
int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count,
|
||||
|
@ -179,8 +179,8 @@ int blk_get_open_flags_from_root_state(BlockBackend *blk);
|
|||
|
||||
void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk,
|
||||
BlockCompletionFunc *cb, void *opaque);
|
||||
int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t sector_num,
|
||||
int nb_sectors, BdrvRequestFlags flags);
|
||||
int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t offset,
|
||||
int count, BdrvRequestFlags flags);
|
||||
int blk_write_compressed(BlockBackend *blk, int64_t sector_num,
|
||||
const uint8_t *buf, int nb_sectors);
|
||||
int blk_truncate(BlockBackend *blk, int64_t offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue