mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
block: Switch bdrv_write_zeroes() to byte interface
Rename to bdrv_pwrite_zeroes() to let the compiler ensure we cater to the updated semantics. Do the same for bdrv_co_write_zeroes(). Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
d05aa8bb4a
commit
74021bc497
11 changed files with 45 additions and 33 deletions
|
@ -883,8 +883,9 @@ static int block_load(QEMUFile *f, void *opaque, int version_id)
|
|||
}
|
||||
|
||||
if (flags & BLK_MIG_FLAG_ZERO_BLOCK) {
|
||||
ret = bdrv_write_zeroes(bs, addr, nr_sectors,
|
||||
BDRV_REQ_MAY_UNMAP);
|
||||
ret = bdrv_pwrite_zeroes(bs, addr << BDRV_SECTOR_BITS,
|
||||
nr_sectors << BDRV_SECTOR_BITS,
|
||||
BDRV_REQ_MAY_UNMAP);
|
||||
} else {
|
||||
buf = g_malloc(BLOCK_SIZE);
|
||||
qemu_get_buffer(f, buf, BLOCK_SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue