All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] block: Ensure non-protocol drivers can only be selected explicitly
@ 2018-03-09 18:21 Fabiano Rosas
  2018-03-09 18:21 ` [Qemu-devel] [PATCH 1/5] block/replication: Remove protocol_name field Fabiano Rosas
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Fabiano Rosas @ 2018-03-09 18:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, kwolf, mreitz

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.


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 | 6 ++++++
 replication.h             | 1 -
 6 files changed, 9 insertions(+), 8 deletions(-)

--
2.13.6

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

end of thread, other threads:[~2018-03-12 22:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09 18:21 [Qemu-devel] [PATCH 0/5] block: Ensure non-protocol drivers can only be selected explicitly Fabiano Rosas
2018-03-09 18:21 ` [Qemu-devel] [PATCH 1/5] block/replication: Remove protocol_name field Fabiano Rosas
2018-03-12 13:41   ` Max Reitz
2018-03-09 18:21 ` [Qemu-devel] [PATCH 2/5] block/quorum: Remove protocol-related fields Fabiano Rosas
2018-03-12 13:44   ` Max Reitz
2018-03-09 18:21 ` [Qemu-devel] [PATCH 3/5] block/throttle: " Fabiano Rosas
2018-03-12 13:44   ` Max Reitz
2018-03-09 18:22 ` [Qemu-devel] [PATCH 4/5] block/blkreplay: " Fabiano Rosas
2018-03-12  8:05   ` Pavel Dovgalyuk
2018-03-12 13:45   ` Max Reitz
2018-03-09 18:22 ` [Qemu-devel] [PATCH 5/5] include/block/block_int: Document protocol related functions Fabiano Rosas
2018-03-12 13:50   ` Max Reitz
2018-03-12 22:26     ` Fabiano Rosas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.