qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/10] block: Integrate bdrv_file_open() into bdrv_open()
@ 2014-01-26 19:02 Max Reitz
  2014-01-26 19:02 ` [Qemu-devel] [PATCH 01/10] block: Change BDS parameter of bdrv_open() to ** Max Reitz
                   ` (9 more replies)
  0 siblings, 10 replies; 35+ messages in thread
From: Max Reitz @ 2014-01-26 19:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Max Reitz

bdrv_file_open() is now nearly a subset of bdrv_open(), except for the
fact that bdrv_file_open() is for protocols and bdrv_open() for block
drivers. It is possible to use bdrv_file_open() with a block driver, but
in that case that block driver must be explicitly specified.

Due to these great similarities, bdrv_file_open() can be integrated and
made a special case of bdrv_open(). If the flag BDRV_O_PROTOCOL is
specified, bdrv_open() will now do what bdrv_file_open() used to do:
Auto-detecting a protocol instead of a block driver.

This series implements this and changes all calls to bdrv_file_open() to
bdrv_open() calls with BDRV_O_PROTOCOL specified.

Note that this flag cannot be discerned automatically since it is
impossible for bdrv_open() to know by itself whether a given file should
be opened with a block driver or through a protocol: Both are valid
alternatives. Therefore, it still has to be specified by the user.


Max Reitz (10):
  block: Change BDS parameter of bdrv_open() to **
  block: Add reference parameter to bdrv_open()
  block: Make bdrv_file_open() static
  block: Reuse NULL options check from bdrv_open()
  block: Reuse reference handling from bdrv_open()
  block: Remove bdrv_new() from bdrv_file_open()
  block: Reuse fail path from bdrv_open()
  block: Reuse bs->options setting from bdrv_open()
  block: Reuse success path from bdrv_open()
  block: Remove bdrv_open_image()'s force_raw option

 block.c               | 191 +++++++++++++++++++++++---------------------------
 block/blkdebug.c      |   2 +-
 block/blkverify.c     |   4 +-
 block/cow.c           |   6 +-
 block/qcow.c          |   6 +-
 block/qcow2.c         |  19 +++--
 block/qed.c           |   5 +-
 block/sheepdog.c      |   8 ++-
 block/vhdx.c          |   5 +-
 block/vmdk.c          |  17 +++--
 block/vvfat.c         |   6 +-
 blockdev.c            |  23 +++---
 hw/block/xen_disk.c   |   4 +-
 include/block/block.h |  12 ++--
 qemu-img.c            |   8 +--
 qemu-io.c             |   8 ++-
 qemu-nbd.c            |   2 +-
 17 files changed, 159 insertions(+), 167 deletions(-)

-- 
1.8.5.3

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

end of thread, other threads:[~2014-02-03 10:05 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-26 19:02 [Qemu-devel] [PATCH 00/10] block: Integrate bdrv_file_open() into bdrv_open() Max Reitz
2014-01-26 19:02 ` [Qemu-devel] [PATCH 01/10] block: Change BDS parameter of bdrv_open() to ** Max Reitz
2014-01-27  2:38   ` Benoît Canet
2014-01-27 18:51     ` Max Reitz
2014-01-27 19:31   ` Jeff Cody
2014-01-27 19:35     ` Max Reitz
2014-01-29 11:50   ` Kevin Wolf
2014-01-31 20:07     ` Max Reitz
2014-02-03  9:49       ` Kevin Wolf
2014-01-26 19:02 ` [Qemu-devel] [PATCH 02/10] block: Add reference parameter to bdrv_open() Max Reitz
2014-01-26 19:02 ` [Qemu-devel] [PATCH 03/10] block: Make bdrv_file_open() static Max Reitz
2014-01-27  2:51   ` Benoît Canet
2014-01-29 13:26   ` Kevin Wolf
2014-01-31 20:20     ` Max Reitz
2014-02-03 10:05       ` Kevin Wolf
2014-01-26 19:02 ` [Qemu-devel] [PATCH 04/10] block: Reuse NULL options check from bdrv_open() Max Reitz
2014-01-27  2:52   ` Benoît Canet
2014-01-26 19:02 ` [Qemu-devel] [PATCH 05/10] block: Reuse reference handling " Max Reitz
2014-01-27  2:56   ` Benoît Canet
2014-01-26 19:02 ` [Qemu-devel] [PATCH 06/10] block: Remove bdrv_new() from bdrv_file_open() Max Reitz
2014-01-27  3:04   ` Benoît Canet
2014-01-29 13:35   ` Kevin Wolf
2014-01-31 20:21     ` Max Reitz
2014-01-26 19:02 ` [Qemu-devel] [PATCH 07/10] block: Reuse fail path from bdrv_open() Max Reitz
2014-01-27  3:10   ` Benoît Canet
2014-01-27 18:58     ` Max Reitz
2014-01-29 13:40   ` Kevin Wolf
2014-01-26 19:02 ` [Qemu-devel] [PATCH 08/10] block: Reuse bs->options setting " Max Reitz
2014-01-27  3:13   ` Benoît Canet
2014-01-29 13:45   ` Kevin Wolf
2014-01-31 20:25     ` Max Reitz
2014-01-26 19:02 ` [Qemu-devel] [PATCH 09/10] block: Reuse success path " Max Reitz
2014-01-27 17:44   ` Jeff Cody
2014-01-27 19:06     ` Max Reitz
2014-01-26 19:02 ` [Qemu-devel] [PATCH 10/10] block: Remove bdrv_open_image()'s force_raw option Max Reitz

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).