Skip to content

Some bs->options fixes

Alberto Garcia 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 Latest5 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5qdict: Make qdict_extract_subqdict() accept dst = NULLqobject/block-qdict.c+8 -30 replies
2/5block: Remove children options from bs->{options, explicit_options}block.c+11 -00 replies
3/5block: Simplify bdrv_reopen_abort()block.c+4 -53 replies
4/5block: Update bs->options if bdrv_reopen() succeedsblock.c+14 -10 replies
5/5block: Simplify append_open_options()block.c+2 -56 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 0/5] Some bs->options fixes

Hi everyone,

this is part of the blockdev-reopen work that I'm doing, but since I'll be away during most of July I thought that I could send already a couple of patches that I think are ready and don't need anything else from the rest of the series.

There's two main fixes here:

1) bs->options are not kept up to date after an image is reopened and no longer reflect its state.

2) bs->options and bs->explicit_options also contain the options of a BDS's children, so there's data that is duplicated and will be inconsistent as soon as you change the children's options directly.

The fix for (2) involves removing all children options from both QDicts. In the cases of node name references ("backing": "node-name") those remain in the QDict (they're technically parent options). I think we don't really need them and it should be possible to get rid of them, but it's a little more complicated (we need them during bdrv_reopen() to ensure that the user didn't try to change any of them).

Regards,

Berto

Alberto Garcia (5):
qdict: Make qdict_extract_subqdict() accept dst = NULL
block: Remove children options from bs->{options,explicit_options}
block: Simplify bdrv_reopen_abort()
block: Update bs->options if bdrv_reopen() succeeds
block: Simplify append_open_options()

 block.c               | 42 +++++++++++++++++++++++++++++++-----------
 qobject/block-qdict.c | 11 ++++++++---
 2 files changed, 39 insertions(+), 14 deletions(-)
Signature · 1 line
2.11.0