]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-io.c
qemu-io: Rework alloc command
authorKevin Wolf <kwolf@redhat.com>
Mon, 20 Jul 2009 14:48:43 +0000 (16:48 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Jul 2009 15:58:47 +0000 (10:58 -0500)
commita7824a886ed50eb4fe3c6fcd6afd8814a6973583
treeca62f5be8f6e47a181bc27ad9555941472f9b914
parentd032044fb97d525ae93fb4c96713a5c467044c17
qemu-io: Rework alloc command

The alloc command in qemu-io is mostly useless currently. Instead of doing a
single call to bdrv_is_allocated, we must call bdrv_is_allocated in a loop
until we have found out for each requested sector if it is allocated or not
(bdrv_is_allocated returns a number of sectors that are known to be in the same
state as the first one, but it is not required to include all of them)

This changes the output format of the alloc command so that a change to the
expected output of qemu-iotests 019 is necessary once this is included.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-io.c