[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 00/37] blockdev: BlockBackend and media
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v2 00/37] blockdev: BlockBackend and media |
Date: |
Mon, 9 Feb 2015 12:11:00 -0500 |
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
- [Qemu-devel] [PATCH v2 00/37] blockdev: BlockBackend and media,
Max Reitz <=
- [Qemu-devel] [PATCH v2 04/37] hw/usb-storage: Check whether BB is inserted, Max Reitz, 2015/02/09
- [Qemu-devel] [PATCH v2 06/37] block: Make bdrv_is_inserted() return a bool, Max Reitz, 2015/02/09
- [Qemu-devel] [PATCH v2 07/37] block: Add blk_is_available(), Max Reitz, 2015/02/09
- [Qemu-devel] [PATCH v2 05/37] block: Fix BB AIOCB AioContext without BDS, Max Reitz, 2015/02/09
- [Qemu-devel] [PATCH v2 01/37] blockdev: Allow creation of BDS trees without BB, Max Reitz, 2015/02/09
- [Qemu-devel] [PATCH v2 03/37] hw/block/fdc: Implement tray status, Max Reitz, 2015/02/09