]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Add bdrv_get_block_status_above
authorFam Zheng <famz@redhat.com>
Mon, 8 Jun 2015 05:56:07 +0000 (13:56 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Jul 2015 01:37:30 +0000 (20:37 -0500)
commit6cacd2651a4afc1935c9d945e615dce72244158a
treeaedaf39264b9d69d80a812513cb2d0df35b3a5de
parente8248a5af1e7a151cbec9b3e14523e00f118cac7
block: Add bdrv_get_block_status_above

Like bdrv_is_allocated_above, this function follows the backing chain until seeing
BDRV_BLOCK_ALLOCATED.  Base is not included.

Reimplement bdrv_is_allocated on top.

[Initialized bdrv_co_get_block_status_above() ret to 0 to silence
mingw64 compiler warning about the unitialized variable.  assert(bs !=
base) prevents that case but I suppose the program could be compiled
with -DNDEBUG.
--Stefan]

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit ba3f0e2545c365ebe1dbddb0e53058710d41881e)
Conflicts:
block/io.c

* applied manually to avoid dependency on 61007b316
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block.c
include/block/block.h