Skip to content

RFC qemu-img: add bitmap queries

John Snow qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest12 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12qcow2-bitmap: cache bm_listblock/qcow2-bitmap.c block/qcow2.c block/qcow2.h+50 -284 replies
2/12qcow2/dirty-bitmap: cache loaded bitmapsblock/qcow2-bitmap.c+1 -01 reply
3/12block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmapsblock/qcow2-bitmap.c+20 -282 replies
4/12qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is ROblock/qcow2-bitmap.c+15 -172 replies
5/12qcow2-bitmap: track bitmap typeblock/qcow2-bitmap.c+2 -00 replies
6/12qapi: add bitmap infoqapi/block-core.json+59 -15 replies
7/12qcow2-bitmap: add basic bitmaps infoblock/qcow2-bitmap.c block/qcow2.c block/qcow2.h+87 -24 replies
8/12qjson: allow caller to ask for arbitrary indentinclude/qapi/qmp/qjson.h qobject/qjson.c+12 -102 replies
9/12qapi/block-core: add BitmapMapping and BitmapEntry structsqapi/block-core.json+32 -02 replies
10/12qemu-img: split off common chunk of map commandqemu-img.c+110 -820 replies
11/12qemu-img: add bitmap dumpqemu-img-cmds.hx qemu-img.c+191 -00 replies
12/12qemu-img: add bitmap clearqemu-img-cmds.hx qemu-img.c+46 -40 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] [RFC PATCH 00/12] qemu-img: add bitmap queries

Allow qemu-img to show information about bitmaps stored in qcow2 images. Add a 'bitmap' meta-command with 'dump' sub-command to retrieve a list of dirty regions in bitmaps stored in a qcow2 image.

RFC:
- I am not 1000% convinced the bm_list caching is perfectly safe, especially with respect to migration and inactivation. There are more efficiencies and tweaks I can make, but I think this is the minimal set.

- I decided not to gate bitmap info in the "info" command behind extra flags.

- Bitmap data-gathering in "bitmap dump" could be made more space-efficient by just reporting one segment at a time, probably.

- bitmap rm and bitmap mk need extra work, so I am not submitting them just yet: rm needs more work around the remove persistence API, and make needs more work around the "can add" API.

- None of these commands will work with "in use" bitmaps; we need qemu-img check -r bitmaps support for this. I'm not sure what the right behavior to "fix" in-use bitmaps should be:
- Cleared: This might be dangerous.
- Fully Set: This is safer, but stupid.
- Deleted: This might be the best option.
- Un-set in-use: VERY dangerous; would rather not.

John Snow (12):
qcow2-bitmap: cache bm_list
qcow2/dirty-bitmap: cache loaded bitmaps block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO
qcow2-bitmap: track bitmap type
qapi: add bitmap info
qcow2-bitmap: add basic bitmaps info
qjson: allow caller to ask for arbitrary indent qapi/block-core: add BitmapMapping and BitmapEntry structs
qemu-img: split off common chunk of map command
qemu-img: add bitmap dump
qemu-img: add bitmap clear

 block/qcow2-bitmap.c     | 220 +++++++++++++++++--------
 block/qcow2.c            |   9 +
 block/qcow2.h            |   3 +
 include/qapi/qmp/qjson.h |   1 +
 qapi/block-core.json     |  92 ++++++++++-
 qemu-img-cmds.hx         |   6 +
 qemu-img.c               | 419 +++++++++++++++++++++++++++++++++++++----------
 qobject/qjson.c          |  21 +--
 8 files changed, 612 insertions(+), 159 deletions(-)
Signature · 1 line
2.14.3