block: Ensure non-protocol drivers can only be selected explicitly
Status from this message: Thanks, applied to the block branch.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 3 repliesApplied
- v15 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- patch 1: updated commit message
- patch 5: improved protocol_name documentation
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | block/replication: Remove protocol_name fieldblock/ replication.h | +0 | 0 replies | |
| 2/5 | block/quorum: Remove protocol-related fieldsblock/ | +1 | 1 reply | |
| 3/5 | block/throttle: Remove protocol-related fieldsblock/ | +1 | 1 reply | |
| 4/5 | block/blkreplay: Remove protocol-related fieldsblock/ | +1 | 0 replies | |
| 5/5 | include/block/block_int: Document protocol related functionsinclude/ | +8 | 0 replies |
Reviews trailers per patch
4 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Max Reitz | Pavel Dovgalyuk | Alberto Garcia |
|---|---|---|---|
| 1/5 | R-b | ||
| 2/5 | R-b | R-b | |
| 3/5 | R-b | R-b | |
| 4/5 | R-b | R-b | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [Qemu-devel] [PATCH v2 0/5] block: Ensure non-protocol drivers can only be selected explicitly
Block drivers can be selected by either protocol syntax:
<protocol>:<filename>[:options]
or explicitly:
driver=<driver>[,option=<opt1>...]
For the protocol syntax to work, drivers should set the protocol_name field of the BlockDriver structure and provide bdrv_file_open and bdrv_parse_filename implementations.
Conversely, block drivers that do not support the protocol syntax should instead implement bdrv_open and not have a protocol_name field.
Some drivers do not currently adhere to this and errors arise when trying to select them using the protocol syntax. For instance:
$ qemu-img info replication:foo qemu-img: block.c:2401: bdrv_open_inherit: \ Assertion `!!(flags & BDRV_O_PROTOCOL) == !!drv->bdrv_file_open' failed. Aborted (core dumped)
This patch-set ensures that the following drivers are meeting the above criteria:
- blkreplay
- quorum
- replication
- throttle
Aside from that, documentation was added to make the above more explicit.
v1 -> v2:
- patch 1: updated commit message
- patch 5: improved protocol_name documentation
https://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg02998.html
Fabiano Rosas (5):
block/replication: Remove protocol_name field block/quorum: Remove protocol-related fields block/throttle: Remove protocol-related fields block/blkreplay: Remove protocol-related fields include/block/block_int: Document protocol related functions
block/blkreplay.c | 3 +-- block/quorum.c | 3 +-- block/replication.c | 1 - block/throttle.c | 3 +-- include/block/block_int.h | 8 ++++++++ replication.h | 1 - 6 files changed, 11 insertions(+), 8 deletions(-)
--
2.13.6