From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH v2 00/37] blockdev: BlockBackend and media
Date: Mon, 9 Feb 2015 12:11:00 -0500 [thread overview]
Message-ID: <1423501897-30410-1-git-send-email-mreitz@redhat.com> (raw)
This series reworks a lot regarding BlockBackend and media. It is
essentially a v3 to the "blockdev: Add blockdev-change-medium with
read-only option" series (which is in fact a part of this series), but
of course does a lot more.
Basically, this series allows empty BlockBackends, that is BBs without a
BDS tree.
Before this series, empty drives are represented by a BlockBackend with
an empty BDS attached to it (a BDS with a NULL driver). However, now we
have BlockBackends, thus an empty drive should be represented by a
BlockBackend without any BDS tree attached to it. This is what this
series does.
This series depends on v4 (or any later version) of my series
'block: Remove "growable", add blk_new_open()'.
v2:
- Patch 1: Make "node-name" obligatory for blockdev-add if "id" is not
given [Eric]
- Patch 3: Conflict due to a test case not being removed in patch 1 in
this version
- Patch 6: Added [Eric]
- Patch 8: Conflicts due to patch 6
- Patch 9: Trivial conflicts due to patch 6, kept Eric's R-b
- Patch 11: Rename wr_highest_sector to wr_highest_offset and let it
store that highest offset, in the sense that qapi/block-core.json
defines it; qmp-commands.hx is changed accordingly [Eric]
- Patch 12: Rebase conflicts due to Peter's multiwrite merge series
- Patch 16: Added a hunk for blk_nb_sectors() [Eric]; kept Eric's R-b
because it is exactly the change he had envisioned
- Patch 17: Rebase conflict due to the new function
blk_get_max_transfer_length()
- Patch 18: Changed commit title [Eric]
- Patch 20: Squashed together all of the following patches from v1
(which where all very similar): 17, 18, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 32, 33, and the patch
"block: Guard remaining unsafe blk_bs() callers" from the
"block: Rework bdrv_close_all()" series
All of these patches have a R-b by Eric, but (for obvious reasons) I
did not merge the R-bs to a single one for this patch
- Patch 21: The same conflict as in patch 3, only in this case it is for
the builtin CD drive instead of the floppy drive
- Patch 25:
- Added a note about this command being a no-op if the tray is already
open [Eric]
- s/Example (1)/Example/ [Eric]
- Patch 26:
- Added a note about this command being a no-op if the tray is already
closed [Eric]
- s/Example (1)/Example/ [Eric]
- Patch 27:
- Added a note about this command being a no-op if the tray is open
and empty [Eric]
- s/Example (1)/Example/ [Eric]
- Patch 28:
- s/Example (1)/Example/ [Eric]
- Removed the "id" option from the blockdev-add command [Eric]
- Patch 30:
- Rebase conflicts due to the new bdrv_add_key() function
- bdrv_unref() was missing from qmp_change_blockdev()
- Patch 32:
- Changed the deprecation note [Eric]
- More indentation for the blockdev-change-medium option descriptions
('read-only-mode' (introduced by patch 34) is longer than
'read-only')
- Patch 34: 'read-only-mode' instead of 'read-only'; 'read-only' instead
of 'ro'; and 'read-write' instead of 'rw' [Eric]
- Patch 35: The same as for patch 34 [Eric]
- Patch 36: "if not path is None" -> "if path is not None" [Eric]
- Patch 37: 'read-only' is now 'read-only-mode', etc.
git-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/37:[0051] [FC] 'blockdev: Allow creation of BDS trees without BB'
002/37:[----] [--] 'iotests: Only create BB if necessary'
003/37:[0001] [FC] 'hw/block/fdc: Implement tray status'
004/37:[----] [--] 'hw/usb-storage: Check whether BB is inserted'
005/37:[----] [--] 'block: Fix BB AIOCB AioContext without BDS'
006/37:[down] 'block: Make bdrv_is_inserted() return a bool'
007/37:[----] [-C] 'block: Add blk_is_available()'
008/37:[0008] [FC] 'block: Make bdrv_is_inserted() recursive'
009/37:[0006] [FC] 'block/quorum: Implement bdrv_is_inserted()'
010/37:[----] [-C] 'block: Move guest_block_size into BlockBackend'
011/37:[down] 'block: Remove wr_highest_sector from BlockAcctStats'
^^^^ actually [0017] [FC] (or something like that)
012/37:[0009] [FC] 'block: Move BlockAcctStats into BlockBackend'
013/37:[----] [-C] 'block: Move I/O status and error actions into BB'
014/37:[----] [--] 'block: Add BlockBackendRootState'
015/37:[----] [-C] 'block: Make some BB functions fall back to BBRS'
016/37:[0004] [FC] 'block: Fail requests to empty BlockBackend'
017/37:[0006] [FC] 'block: Prepare remaining BB functions for NULL BDS'
018/37:[down] 'blockdev: Use BB for blockdev-backup transaction'
^^^^ actually [----] [--]
019/37:[----] [--] 'block: Add blk_insert_bs()'
020/37:[down] 'block: Prepare for NULL BDS'
021/37:[0001] [FC] 'blockdev: Do not create BDS for empty drive'
022/37:[----] [-C] 'blockdev: Pull out blockdev option extraction'
023/37:[----] [-C] 'blockdev: Allow more options for BB-less BDS tree'
024/37:[----] [--] 'block: Add blk_remove_bs()'
025/37:[0006] [FC] 'blockdev: Add blockdev-open-tray'
026/37:[0006] [FC] 'blockdev: Add blockdev-close-tray'
027/37:[0006] [FC] 'blockdev: Add blockdev-remove-medium'
028/37:[0005] [FC] 'blockdev: Add blockdev-insert-medium'
029/37:[----] [--] 'blockdev: Implement eject with basic operations'
030/37:[0044] [FC] 'blockdev: Implement change with basic operations'
031/37:[----] [--] 'block: Inquire tray state before tray-moved events'
032/37:[0015] [FC] 'qmp: Introduce blockdev-change-medium'
033/37:[----] [--] 'hmp: Use blockdev-change-medium for change command'
034/37:[down] 'blockdev: read-only-mode for blockdev-change-medium'
^^^^ actually [0028] [FC]
035/37:[down] 'hmp: Add read-only-mode option to change command'
^^^^ actually [0019] [FC]
036/37:[0002] [FC] 'iotests: More options for VM.add_drive()'
037/37:[0046] [FC] 'iotests: Add test for change-related QMP commands'
Max Reitz (37):
blockdev: Allow creation of BDS trees without BB
iotests: Only create BB if necessary
hw/block/fdc: Implement tray status
hw/usb-storage: Check whether BB is inserted
block: Fix BB AIOCB AioContext without BDS
block: Make bdrv_is_inserted() return a bool
block: Add blk_is_available()
block: Make bdrv_is_inserted() recursive
block/quorum: Implement bdrv_is_inserted()
block: Move guest_block_size into BlockBackend
block: Remove wr_highest_sector from BlockAcctStats
block: Move BlockAcctStats into BlockBackend
block: Move I/O status and error actions into BB
block: Add BlockBackendRootState
block: Make some BB functions fall back to BBRS
block: Fail requests to empty BlockBackend
block: Prepare remaining BB functions for NULL BDS
blockdev: Use BB for blockdev-backup transaction
block: Add blk_insert_bs()
block: Prepare for NULL BDS
blockdev: Do not create BDS for empty drive
blockdev: Pull out blockdev option extraction
blockdev: Allow more options for BB-less BDS tree
block: Add blk_remove_bs()
blockdev: Add blockdev-open-tray
blockdev: Add blockdev-close-tray
blockdev: Add blockdev-remove-medium
blockdev: Add blockdev-insert-medium
blockdev: Implement eject with basic operations
blockdev: Implement change with basic operations
block: Inquire tray state before tray-moved events
qmp: Introduce blockdev-change-medium
hmp: Use blockdev-change-medium for change command
blockdev: read-only-mode for blockdev-change-medium
hmp: Add read-only-mode option to change command
iotests: More options for VM.add_drive()
iotests: Add test for change-related QMP commands
block.c | 170 +-------
block/accounting.c | 8 -
block/backup.c | 17 +-
block/block-backend.c | 368 +++++++++++++++--
block/commit.c | 3 +-
block/mirror.c | 17 +-
block/qapi.c | 36 +-
block/quorum.c | 16 +
block/raw-posix.c | 10 +-
block/raw_bsd.c | 2 +-
block/stream.c | 3 +-
blockdev.c | 919 +++++++++++++++++++++++++++++------------
blockjob.c | 5 +-
hmp-commands.hx | 20 +-
hmp.c | 47 ++-
hw/block/fdc.c | 20 +-
hw/block/xen_disk.c | 4 +-
hw/usb/dev-storage.c | 2 +-
include/block/accounting.h | 3 -
include/block/block.h | 16 +-
include/block/block_int.h | 24 +-
include/qemu/typedefs.h | 1 +
include/sysemu/block-backend.h | 14 +-
include/sysemu/blockdev.h | 2 -
qapi-schema.json | 6 +-
qapi/block-core.json | 129 +++++-
qmp-commands.hx | 213 +++++++++-
qmp.c | 9 +-
tests/fdc-test.c | 4 +-
tests/qemu-iotests/067.out | 104 +----
tests/qemu-iotests/071 | 50 ++-
tests/qemu-iotests/071.out | 16 +-
tests/qemu-iotests/081 | 14 +-
tests/qemu-iotests/081.out | 7 +-
tests/qemu-iotests/087 | 2 +-
tests/qemu-iotests/087.out | 16 +-
tests/qemu-iotests/118 | 653 +++++++++++++++++++++++++++++
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
tests/qemu-iotests/iotests.py | 9 +-
40 files changed, 2273 insertions(+), 692 deletions(-)
create mode 100755 tests/qemu-iotests/118
create mode 100644 tests/qemu-iotests/118.out
--
2.1.0
next reply other threads:[~2015-02-09 17:11 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 17:11 Max Reitz [this message]
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 01/37] blockdev: Allow creation of BDS trees without BB Max Reitz
2015-02-09 18:17 ` Eric Blake
2015-02-09 18:29 ` Max Reitz
2015-03-04 13:39 ` Kevin Wolf
2015-03-04 14:04 ` Max Reitz
2015-03-04 14:15 ` Kevin Wolf
2015-03-04 14:23 ` Max Reitz
2015-03-04 21:44 ` Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 02/37] iotests: Only create BB if necessary Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 03/37] hw/block/fdc: Implement tray status Max Reitz
2015-02-09 18:23 ` Eric Blake
2015-03-04 14:00 ` Kevin Wolf
2015-03-04 14:07 ` Max Reitz
2015-03-04 22:06 ` Max Reitz
2015-03-05 10:11 ` Kevin Wolf
2015-03-16 13:36 ` Max Reitz
2015-03-16 15:47 ` Markus Armbruster
2015-03-16 15:48 ` Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 04/37] hw/usb-storage: Check whether BB is inserted Max Reitz
2015-03-04 14:02 ` Kevin Wolf
2015-03-04 14:07 ` Max Reitz
2015-03-04 14:20 ` Kevin Wolf
2015-03-04 14:24 ` Max Reitz
2015-03-04 14:39 ` Kevin Wolf
2015-03-04 14:41 ` Max Reitz
2015-03-04 14:52 ` Max Reitz
2015-03-04 14:53 ` Kevin Wolf
2015-03-04 14:58 ` Max Reitz
2015-03-04 22:06 ` Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 05/37] block: Fix BB AIOCB AioContext without BDS Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 06/37] block: Make bdrv_is_inserted() return a bool Max Reitz
2015-02-09 18:29 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 07/37] block: Add blk_is_available() Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 08/37] block: Make bdrv_is_inserted() recursive Max Reitz
2015-02-09 19:16 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 09/37] block/quorum: Implement bdrv_is_inserted() Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 10/37] block: Move guest_block_size into BlockBackend Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 11/37] block: Remove wr_highest_sector from BlockAcctStats Max Reitz
2015-02-09 19:20 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 12/37] block: Move BlockAcctStats into BlockBackend Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 13/37] block: Move I/O status and error actions into BB Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 14/37] block: Add BlockBackendRootState Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 15/37] block: Make some BB functions fall back to BBRS Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 16/37] block: Fail requests to empty BlockBackend Max Reitz
2015-02-25 18:18 ` Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 17/37] block: Prepare remaining BB functions for NULL BDS Max Reitz
2015-02-09 20:47 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 18/37] blockdev: Use BB for blockdev-backup transaction Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 19/37] block: Add blk_insert_bs() Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 20/37] block: Prepare for NULL BDS Max Reitz
2015-02-09 21:21 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 21/37] blockdev: Do not create BDS for empty drive Max Reitz
2015-02-09 21:32 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 22/37] blockdev: Pull out blockdev option extraction Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 23/37] blockdev: Allow more options for BB-less BDS tree Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 24/37] block: Add blk_remove_bs() Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 25/37] blockdev: Add blockdev-open-tray Max Reitz
2015-02-09 22:01 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 26/37] blockdev: Add blockdev-close-tray Max Reitz
2015-02-09 22:18 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 27/37] blockdev: Add blockdev-remove-medium Max Reitz
2015-02-09 22:21 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 28/37] blockdev: Add blockdev-insert-medium Max Reitz
2015-02-09 22:23 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 29/37] blockdev: Implement eject with basic operations Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 30/37] blockdev: Implement change " Max Reitz
2015-02-09 22:28 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 31/37] block: Inquire tray state before tray-moved events Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 32/37] qmp: Introduce blockdev-change-medium Max Reitz
2015-02-09 23:09 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 33/37] hmp: Use blockdev-change-medium for change command Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 34/37] blockdev: read-only-mode for blockdev-change-medium Max Reitz
2015-02-09 23:15 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 35/37] hmp: Add read-only-mode option to change command Max Reitz
2015-02-09 23:17 ` Eric Blake
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 36/37] iotests: More options for VM.add_drive() Max Reitz
2015-02-09 17:11 ` [Qemu-devel] [PATCH v2 37/37] iotests: Add test for change-related QMP commands Max Reitz
2015-02-10 0:06 ` Eric Blake
2015-02-10 20:37 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423501897-30410-1-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).