Skip to content

Fix bdrv_is_allocated usage bugs

Eric Blake qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3backup: React to bdrv_is_allocated() errorsblock/backup.c+10 -40 replies
2/3vvfat: React to bdrv_is_allocated() errorsblock/vvfat.c+19 -30 replies
3/3migration: Document handling of bdrv_is_allocated() errorsmigration/block.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH for-2.9 0/3] Fix bdrv_is_allocated usage bugs

bdrv_is_allocated() returns tri-state, not just bool, although there were several callers using it as a bool. Fix them to either propagate the error or to document why treatment of failure like allocation is okay.

[Found during a larger effort to convert bdrv_get_block_status to be byte-based for 2.10]

Eric Blake (3):
backup: React to bdrv_is_allocated() errors
vvfat: React to bdrv_is_allocated() errors
migration: Document handling of bdrv_is_allocated() errors

 block/backup.c    | 14 ++++++++++----
 block/vvfat.c     | 22 +++++++++++++++++++---
 migration/block.c |  2 ++
 3 files changed, 31 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.3