qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/14] Don't pass flags to bdrv_reopen_queue()
@ 2018-10-17 12:57 Alberto Garcia
  2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 01/14] block: Don't call update_flags_from_options() if the options are wrong Alberto Garcia
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Alberto Garcia @ 2018-10-17 12:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alberto Garcia, qemu-block, Kevin Wolf, Max Reitz

Hi all,

when reopening a BlockDriverState using bdrv_reopen() and friends the
new options can be specified either with a QDict or with flags. Both
methods overlap and that makes the semantics and the implementation
unnecessarily complicated.

This series removes the 'flags' parameter from these functions, so
from now on all option changes must be specified using a QDict. Apart
from simplifying the API, a few bugs are fixed along the way. See the
individual patches for more details.

This was tested with the current master (09558375a634e17cea6cfbfec88).

Regards,

Berto

v2:
- Patches 4 and 9: Fixed trivial rebase conflict
- Patch 11: Update messages [Max]
- Patch 12: Add comment and use bdrv_is_read_only() instead of
            using the flags directly [Max]
- Patch 14: Remove inner block and move all variable declarations to
            the beginning of the function [Max]

v1: https://lists.gnu.org/archive/html/qemu-block/2018-09/msg00483.html
- Initial version

Output of backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/14:[----] [--] 'block: Don't call update_flags_from_options() if the options are wrong'
002/14:[----] [--] 'block: Add bdrv_reopen_set_read_only()'
003/14:[----] [--] 'block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename()'
004/14:[0006] [FC] 'block: Use bdrv_reopen_set_read_only() in commit_start/complete()'
005/14:[----] [--] 'block: Use bdrv_reopen_set_read_only() in bdrv_commit()'
006/14:[----] [-C] 'block: Use bdrv_reopen_set_read_only() in stream_start/complete()'
007/14:[----] [--] 'block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file()'
008/14:[----] [--] 'block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()'
009/14:[0003] [FC] 'block: Use bdrv_reopen_set_read_only() in the mirror driver'
010/14:[----] [--] 'block: Drop bdrv_reopen()'
011/14:[0018] [FC] 'qemu-io: Put flag changes in the options QDict in reopen_f()'
012/14:[0011] [FC] 'block: Clean up reopen_backing_file() in block/replication.c'
013/14:[----] [--] 'block: Remove flags parameter from bdrv_reopen_queue()'
014/14:[0042] [FC] 'block: Stop passing flags to bdrv_reopen_queue_child()'

Alberto Garcia (14):
  block: Don't call update_flags_from_options() if the options are wrong
  block: Add bdrv_reopen_set_read_only()
  block: Use bdrv_reopen_set_read_only() in
    bdrv_backing_update_filename()
  block: Use bdrv_reopen_set_read_only() in commit_start/complete()
  block: Use bdrv_reopen_set_read_only() in bdrv_commit()
  block: Use bdrv_reopen_set_read_only() in stream_start/complete()
  block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file()
  block: Use bdrv_reopen_set_read_only() in external_snapshot_commit()
  block: Use bdrv_reopen_set_read_only() in the mirror driver
  block: Drop bdrv_reopen()
  qemu-io: Put flag changes in the options QDict in reopen_f()
  block: Clean up reopen_backing_file() in block/replication.c
  block: Remove flags parameter from bdrv_reopen_queue()
  block: Stop passing flags to bdrv_reopen_queue_child()

 block.c                    | 86 +++++++++++++++++++++-------------------------
 block/commit.c             | 23 +++++--------
 block/mirror.c             | 19 ++++++----
 block/replication.c        | 43 ++++++++++-------------
 block/stream.c             | 20 +++++------
 blockdev.c                 | 11 ++----
 include/block/block.h      |  6 ++--
 qemu-io-cmds.c             | 29 ++++++++++++++--
 tests/qemu-iotests/133     | 15 ++++++++
 tests/qemu-iotests/133.out | 12 +++++++
 10 files changed, 150 insertions(+), 114 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-10-17 12:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 12:57 [Qemu-devel] [PATCH v2 00/14] Don't pass flags to bdrv_reopen_queue() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 01/14] block: Don't call update_flags_from_options() if the options are wrong Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 02/14] block: Add bdrv_reopen_set_read_only() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 03/14] block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 04/14] block: Use bdrv_reopen_set_read_only() in commit_start/complete() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 05/14] block: Use bdrv_reopen_set_read_only() in bdrv_commit() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 06/14] block: Use bdrv_reopen_set_read_only() in stream_start/complete() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 07/14] block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 08/14] block: Use bdrv_reopen_set_read_only() in external_snapshot_commit() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 09/14] block: Use bdrv_reopen_set_read_only() in the mirror driver Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 10/14] block: Drop bdrv_reopen() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 11/14] qemu-io: Put flag changes in the options QDict in reopen_f() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 12/14] block: Clean up reopen_backing_file() in block/replication.c Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 13/14] block: Remove flags parameter from bdrv_reopen_queue() Alberto Garcia
2018-10-17 12:57 ` [Qemu-devel] [PATCH v2 14/14] block: Stop passing flags to bdrv_reopen_queue_child() Alberto Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).