All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 8/8] block: Remove bdrv_states
Date: Wed, 25 Nov 2015 14:50:02 +0100	[thread overview]
Message-ID: <20151125135002.GD12581@noname.str.redhat.com> (raw)
In-Reply-To: <1447126069-6185-9-git-send-email-mreitz@redhat.com>

Am 10.11.2015 um 04:27 hat Max Reitz geschrieben:
> Every entry in this list should be a root BDS and as such either be
> anchored to a BlockBackend or be owned by the monitor.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  block.c                   | 30 +-----------------------------
>  blockdev.c                |  8 --------
>  include/block/block.h     |  1 -
>  include/block/block_int.h |  4 ----
>  4 files changed, 1 insertion(+), 42 deletions(-)

>  void bdrv_make_anon(BlockDriverState *bs)
>  {
> -    /*
> -     * Take care to remove bs from bdrv_states only when it's actually
> -     * in it.  Note that bs->device_list.tqe_prev is initially null,
> -     * and gets set to non-null by QTAILQ_INSERT_TAIL().  Establish
> -     * the useful invariant "bs in bdrv_states iff bs->tqe_prev" by
> -     * resetting it to null on remove.
> -     */
> -    if (bs->device_list.tqe_prev) {
> -        QTAILQ_REMOVE(&bdrv_states, bs, device_list);
> -        bs->device_list.tqe_prev = NULL;
> -    }
>      if (bs->node_name[0] != '\0') {
>          QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list);
>      }

bdrv_make_anon() has only a single user at this point and the remaining
part after this patch is so small that we could consider inlining it.

Kevin

  reply	other threads:[~2015-11-25 13:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  3:27 [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work Max Reitz
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 [this message]
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=20151125135002.GD12581@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=mreitz@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 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.