All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild
@ 2016-06-21  9:21 Kevin Wolf
  2016-06-21  9:21 ` [Qemu-devel] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow Kevin Wolf
                   ` (18 more replies)
  0 siblings, 19 replies; 48+ messages in thread
From: Kevin Wolf @ 2016-06-21  9:21 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, stefanha, famz, mreitz, jcody, qemu-devel

This series converts all I/O function in the core block layer up to
bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter
instead of a BlockDriverState.

The original motivation for this change were op blockers, where one of
the biggest problems is making sure that every user of block devices
actually registers correctly with the op blockers system. If the I/O
functions know which parent a request comes from (BdrvChild basically
corresponds to an edge in our block device graph), it can use assertions
to make sure that that parent has actually registered its activities and
thereby ensured that it doesn't conflict with other users.

There are, however, more benefits we get from this change. The most
important one is probably that it enforces important aspects of the
block layer design like that external users go through a BlockBackend
and request are internally routed along the edges of the graph. Accesses
to random BDSes are no longer possible, you need to own an actual child
reference so you can make a request.

The work on this series already led to a few cleanups and BlockBackend
conversions in master, and this series contains a few more.

As a bonus, all the block drivers using bs->file->bs everywhere can now
go back to bs->file, which is a little nicer to read.

Kevin Wolf (17):
  vvfat: Use BdrvChild for s->qcow
  blkreplay: Convert to byte-based I/O
  vhdx: Some more BlockBackend use in vhdx_create()
  block: Convert bdrv_co_readv() to BdrvChild
  block: Convert bdrv_co_writev() to BdrvChild
  block: Convert bdrv_aio_readv() to BdrvChild
  block: Convert bdrv_aio_writev() to BdrvChild
  block: Convert bdrv_co_do_readv/writev to BdrvChild
  block: Move bdrv_commit() to block/commit.c
  block: Use BlockBackend for I/O in bdrv_commit()
  block: Convert bdrv_read() to BdrvChild
  block: Convert bdrv_write() to BdrvChild
  block: Convert bdrv_pread(v) to BdrvChild
  block: Convert bdrv_pwrite(v/_sync) to BdrvChild
  block: Convert bdrv_pwrite_zeroes() to BdrvChild
  block: Convert bdrv_prwv_co() to BdrvChild
  block: Convert bdrv_co_preadv/pwritev to BdrvChild

 block.c                        | 117 ++----------------------------------
 block/Makefile.objs            |   3 +-
 block/blkdebug.c               |   4 +-
 block/blkreplay.c              |  18 +++---
 block/blkverify.c              |   8 +--
 block/block-backend.c          |   9 ++-
 block/bochs.c                  |   8 +--
 block/cloop.c                  |   8 +--
 block/commit.c                 | 121 +++++++++++++++++++++++++++++++++++++
 block/crypto.c                 |   6 +-
 block/dmg.c                    |  21 +++----
 block/io.c                     | 132 ++++++++++++++++++++++-------------------
 block/parallels.c              |  16 ++---
 block/qcow.c                   |  41 +++++++------
 block/qcow2-cache.c            |   4 +-
 block/qcow2-cluster.c          |  18 +++---
 block/qcow2-refcount.c         |  36 +++++------
 block/qcow2-snapshot.c         |  26 ++++----
 block/qcow2.c                  |  50 +++++++++-------
 block/qed-table.c              |   4 +-
 block/qed.c                    |  22 +++----
 block/quorum.c                 |   8 +--
 block/raw_bsd.c                |   6 +-
 block/vdi.c                    |  14 ++---
 block/vhdx-log.c               |  12 ++--
 block/vhdx.c                   |  85 ++++++++++++++------------
 block/vmdk.c                   |  54 ++++++++---------
 block/vpc.c                    |  24 ++++----
 block/vvfat.c                  |  61 ++++++++++++-------
 include/block/block.h          |  38 ++++++------
 include/block/block_int.h      |   4 +-
 include/sysemu/block-backend.h |   1 +
 qemu-img.c                     |   2 +-
 33 files changed, 522 insertions(+), 459 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2016-06-29 15:37 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21  9:21 [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild Kevin Wolf
2016-06-21  9:21 ` [Qemu-devel] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow Kevin Wolf
2016-06-22 16:54   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-based I/O Kevin Wolf
2016-06-22 17:03   ` Max Reitz
2016-06-22 17:15   ` Eric Blake
2016-06-21  9:21 ` [Qemu-devel] [PATCH 03/17] vhdx: Some more BlockBackend use in vhdx_create() Kevin Wolf
2016-06-22 17:08   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 04/17] block: Convert bdrv_co_readv() to BdrvChild Kevin Wolf
2016-06-25 15:07   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 05/17] block: Convert bdrv_co_writev() " Kevin Wolf
2016-06-25 15:14   ` Max Reitz
2016-06-27  8:56     ` Kevin Wolf
2016-06-21  9:21 ` [Qemu-devel] [PATCH 06/17] block: Convert bdrv_aio_readv() " Kevin Wolf
2016-06-25 15:16   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 07/17] block: Convert bdrv_aio_writev() " Kevin Wolf
2016-06-25 15:20   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 08/17] block: Convert bdrv_co_do_readv/writev " Kevin Wolf
2016-06-25 15:26   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 09/17] block: Move bdrv_commit() to block/commit.c Kevin Wolf
2016-06-24 15:37   ` Eric Blake
2016-06-21  9:21 ` [Qemu-devel] [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit() Kevin Wolf
2016-06-25 15:34   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 11/17] block: Convert bdrv_read() to BdrvChild Kevin Wolf
2016-06-27 13:24   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 12/17] block: Convert bdrv_write() " Kevin Wolf
2016-06-27 13:44   ` Max Reitz
2016-06-27 13:47     ` Max Reitz
2016-06-29 12:11       ` [Qemu-devel] [PATCH v2 " Kevin Wolf
2016-06-29 15:22         ` Max Reitz
2016-06-29 15:33           ` Kevin Wolf
2016-06-29 15:37             ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 13/17] block: Convert bdrv_pread(v) " Kevin Wolf
2016-06-27 14:55   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 14/17] block: Convert bdrv_pwrite(v/_sync) " Kevin Wolf
2016-06-27 15:07   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 15/17] block: Convert bdrv_pwrite_zeroes() " Kevin Wolf
2016-06-27 15:12   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 16/17] block: Convert bdrv_prwv_co() " Kevin Wolf
2016-06-27 15:19   ` Max Reitz
2016-06-21  9:21 ` [Qemu-devel] [PATCH 17/17] block: Convert bdrv_co_preadv/pwritev " Kevin Wolf
2016-06-21  9:47 ` [Qemu-devel] [PATCH 00/17] block: Convert common I/O path " Paolo Bonzini
2016-06-21 10:56   ` Kevin Wolf
2016-06-21 11:01     ` Paolo Bonzini
2016-06-21 11:31       ` Kevin Wolf
2016-06-22  8:37         ` Fam Zheng
2016-06-28 13:28 ` Stefan Hajnoczi
2016-06-29 11:58   ` Kevin Wolf

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.