block: add flags to bdrv_*_write_zeroes

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Peter Lieven 2013-10-24 12:06:51 +02:00 committed by Kevin Wolf
parent 6faac15fa8
commit aa7bfbfff7
11 changed files with 27 additions and 21 deletions

View file

@ -780,7 +780,7 @@ 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);
ret = bdrv_write_zeroes(bs, addr, nr_sectors, 0);
} else {
buf = g_malloc(BLOCK_SIZE);
qemu_get_buffer(f, buf, BLOCK_SIZE);