All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, berto@igalia.com, armbru@redhat.com,
	qemu-block@nongnu.org, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 0/3] Prefer bdrv_lookup_bs() to find BDS nodes
Date: Wed, 14 Oct 2015 09:15:59 -0400	[thread overview]
Message-ID: <cover.1444827043.git.jcody@redhat.com> (raw)

This series is on top of Alberto's "Add 'blockdev-snapshot' command" series

BlockBackend devices and BlockDriverState node-names occupy the same
namespace.  In addition, there are two methods that can be used in different
circumstances to look up a BlockDriverState: blk_by_name() and bdrv_find_node().

There is also a common interface, bdrv_lookup_bs(), that can look up either by
blk_by_name() or bdrv_find_node().

This makes bdrv_find_node() redundant for an external interface.  And in the
cases where we just want the underlying BDS for a BlockBackend device, it is
simpler to use bdrv_lookup_bs() instead of blk_by_name().

This series makes bdrv_find_node() static and internal to block.c as a helper
function, and attempts to simplify some code when we are looking just for the
BDS of a BlockBackend device.

Jeff Cody (3):
  block: Use bdrv_lookup_bs() instead of bdrv_find_node()
  block: make bdrv_find_node() static
  block: use bdrv_lookup_bs() over blk_by_name() for BDS only results

 block.c                 | 30 +++++++++---------
 block/block-backend.c   |  2 +-
 block/mirror.c          |  2 +-
 block/write-threshold.c |  2 +-
 blockdev.c              | 84 ++++++++++++++++++-------------------------------
 include/block/block.h   |  1 -
 migration/block.c       |  6 ++--
 7 files changed, 50 insertions(+), 77 deletions(-)

-- 
1.9.3

             reply	other threads:[~2015-10-14 13:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 13:15 Jeff Cody [this message]
2015-10-14 13:16 ` [Qemu-devel] [PATCH 1/3] block: Use bdrv_lookup_bs() instead of bdrv_find_node() Jeff Cody
2015-10-14 17:29   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-10-14 17:34     ` Max Reitz
2015-10-14 17:42       ` Jeff Cody
2015-10-15 12:01   ` [Qemu-devel] " Alberto Garcia
2015-10-16  7:52   ` Markus Armbruster
2015-10-14 13:16 ` [Qemu-devel] [PATCH 2/3] block: make bdrv_find_node() static Jeff Cody
2015-10-14 17:41   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-10-15 12:01   ` [Qemu-devel] " Alberto Garcia
2015-10-14 13:16 ` [Qemu-devel] [PATCH 3/3] block: use bdrv_lookup_bs() over blk_by_name() for BDS only results Jeff Cody
2015-10-14 18:05   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-10-14 18:13     ` 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=cover.1444827043.git.jcody@redhat.com \
    --to=jcody@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 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.