]> git.proxmox.com Git - mirror_qemu.git/commit
block: Simplify BDRV_BLOCK_RAW recursion
authorEric Blake <eblake@redhat.com>
Thu, 4 May 2017 17:37:45 +0000 (12:37 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Aug 2017 21:01:28 +0000 (16:01 -0500)
commit6a3f9c5c6e54d05e35bad786ce619d72d02c29de
treeca1ec75fb9600471ba6cf19795714ded8258dad7
parent3f3fe284efba3021b8a06bddcff75efa4e62c615
block: Simplify BDRV_BLOCK_RAW recursion

Since we are already in coroutine context during the body of
bdrv_co_get_block_status(), we can shave off a few layers of
wrappers when recursing to query the protocol when a format driver
returned BDRV_BLOCK_RAW.

Note that we are already using the correct recursion later on in
the same function, when probing whether the protocol layer is sparse
in order to find out if we can add BDRV_BLOCK_ZERO to an existing
BDRV_BLOCK_DATA|BDRV_BLOCK_OFFSET_VALID.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20170504173745.27414-1-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit ee29d6adefcca7e76abb124183814ed3acc74fac)
* prereq for 81c219a
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/io.c