qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work
Date: Tue, 10 Nov 2015 04:27:41 +0100	[thread overview]
Message-ID: <1447126069-6185-1-git-send-email-mreitz@redhat.com> (raw)

Overall, this series adds more uses for BlockBackends and makes the code
follow the "reference theory" more closely, in that any BlockBackend
created (through -drive or blockdev-add) has a reference count of 1, and
that reference should be held by the monitor. This is reflected here by
introducing an explicit list of monitor-owned BlockBackends, which in
turn allows us to remove bdrv_states, and, perhaps most importantly,
blk_hide_on_behalf_of_do_drive_del().

Also, it lays groundwork for a nice series that will make bdrv_open()
return a BDS pointer.


This series depends on v8 (or any later version) of my series
"block: Rework bdrv_close_all()" (or any later version). With v7 you
will get a contextual conflict in patch 5 which should be simple to
resolve, however.

(No, v8 is not yet out, what I am referring to as that is basically v7
 with a fix for the following:
 http://lists.nongnu.org/archive/html/qemu-block/2015-11/msg00330.html)


v2:
- Mostly a rebase, complicated by the fact that the underlying series
  have changed a lot in the meantime.


Although I don't suppose anyone will care much, here's that
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/8:[----] [-C] 'block: Add blk_name_taken()'
002/8:[----] [-C] 'block: Add blk_next_inserted()'
003/8:[----] [-C] 'block: Add blk_commit_all() and blk_invalidate_cache_all()'
004/8:[0073] [FC] 'block: Use BlockBackend more'
005/8:[0004] [FC] 'blockdev: Add list of monitor-owned BlockBackends'
006/8:[down] 'blockdev: Remove blk_hide_on_behalf_of_hmp_drive_del()'
      (renamed from "..._on_behalf_of_do_drive_del()")
007/8:[0213] [FC] 'block: Move some bdrv_*_all() functions to BB'
008/8:[0027] [FC] 'block: Remove bdrv_states'



Max Reitz (8):
  block: Add blk_name_taken()
  block: Add blk_next_inserted()
  block: Add blk_commit_all() and blk_invalidate_cache_all()
  block: Use BlockBackend more
  blockdev: Add list of monitor-owned BlockBackends
  blockdev: Remove blk_hide_on_behalf_of_hmp_drive_del()
  block: Move some bdrv_*_all() functions to BB
  block: Remove bdrv_states

 block.c                        |  82 ++------------
 block/block-backend.c          | 245 ++++++++++++++++++++++++++++++++++-------
 block/io.c                     |  88 ---------------
 block/qapi.c                   |  13 ++-
 blockdev.c                     |  29 ++---
 cpus.c                         |   7 +-
 include/block/block.h          |   5 -
 include/block/block_int.h      |   4 -
 include/sysemu/block-backend.h |   8 +-
 migration/block.c              |   7 +-
 migration/migration.c          |   3 +-
 migration/savevm.c             |  66 ++++++-----
 monitor.c                      |  15 ++-
 qemu-char.c                    |   3 +-
 qemu-io.c                      |   2 +-
 qmp.c                          |   9 +-
 stubs/Makefile.objs            |   2 +-
 stubs/bdrv-commit-all.c        |   7 --
 stubs/blk-commit-all.c         |   7 ++
 xen-mapcache.c                 |   3 +-
 20 files changed, 322 insertions(+), 283 deletions(-)
 delete mode 100644 stubs/bdrv-commit-all.c
 create mode 100644 stubs/blk-commit-all.c

-- 
2.6.2

             reply	other threads:[~2015-11-10  3:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  3:27 Max Reitz [this message]
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 1/8] block: Add blk_name_taken() Max Reitz
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 2/8] block: Add blk_next_inserted() Max Reitz
2015-11-11 15:33   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 3/8] block: Add blk_commit_all() and blk_invalidate_cache_all() Max Reitz
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 4/8] block: Use BlockBackend more Max Reitz
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 5/8] blockdev: Add list of monitor-owned BlockBackends Max Reitz
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 6/8] blockdev: Remove blk_hide_on_behalf_of_hmp_drive_del() Max Reitz
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 7/8] block: Move some bdrv_*_all() functions to BB Max Reitz
2015-12-01 16:01   ` Kevin Wolf
2015-12-04 23:15     ` Max Reitz
2015-12-07 11:16       ` Kevin Wolf
2015-11-10  3:27 ` [Qemu-devel] [PATCH v2 8/8] block: Remove bdrv_states Max Reitz
2015-11-25 13:50   ` Kevin Wolf
2015-11-10  3:45 ` [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work Eric Blake
2015-11-10  3:49   ` Max Reitz
2015-11-10  3:58     ` Jeff Cody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447126069-6185-1-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).