qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
	qemu-block@nongnu.org, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 06/15] blockdev: Add blockdev-remove-medium
Date: Tue, 27 Oct 2015 14:44:48 +0100	[thread overview]
Message-ID: <20151027134448.GA15916@noname.str.redhat.com> (raw)
In-Reply-To: <1445891959-27432-7-git-send-email-mreitz@redhat.com>

Am 26.10.2015 um 21:39 hat Max Reitz geschrieben:
> Signed-off-by: Max Reitz <mreitz@redhat.com>

> +    if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) {
> +        goto out;
> +    }
> +
> +    /* This follows the convention established by bdrv_make_anon() */
> +    if (bs->device_list.tqe_prev) {
> +        QTAILQ_REMOVE(&bdrv_states, bs, device_list);
> +        bs->device_list.tqe_prev = NULL;
> +    }
> +
> +    blk_remove_bs(blk);

Wouldn't it be nicer to move the bdrv_states update into
blk_remove_bs() and blk_insert_bs()? Can be done on top of this series,
though, if you don't need to respin for another reason.

Kevin

  reply	other threads:[~2015-10-27 13:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 20:39 [Qemu-devel] [PATCH v8 00/15] blockdev: BlockBackend and media Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 01/15] block: Add blk_remove_bs() Max Reitz
2015-10-27  9:04   ` Alberto Garcia
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 02/15] block: Make bdrv_states public Max Reitz
2015-10-27  9:21   ` Alberto Garcia
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 03/15] block: Add functions for inheriting a BBRS Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 04/15] blockdev: Add blockdev-open-tray Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 05/15] blockdev: Add blockdev-close-tray Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 06/15] blockdev: Add blockdev-remove-medium Max Reitz
2015-10-27 13:44   ` Kevin Wolf [this message]
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 07/15] blockdev: Add blockdev-insert-medium Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 08/15] blockdev: Implement eject with basic operations Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 09/15] blockdev: Implement change " Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 10/15] block: Inquire tray state before tray-moved events Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 11/15] qmp: Introduce blockdev-change-medium Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 12/15] hmp: Use blockdev-change-medium for change command Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 13/15] blockdev: read-only-mode for blockdev-change-medium Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 14/15] hmp: Add read-only-mode option to change command Max Reitz
2015-10-26 20:39 ` [Qemu-devel] [PATCH v8 15/15] iotests: Add test for change-related QMP commands Max Reitz
2015-10-27 14:18 ` [Qemu-devel] [PATCH v8 00/15] blockdev: BlockBackend and media Kevin Wolf

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=20151027134448.GA15916@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=jsnow@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 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).