From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr4Ya-0002XA-Bv for qemu-devel@nongnu.org; Tue, 27 Oct 2015 09:44:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr4YZ-0000O6-KG for qemu-devel@nongnu.org; Tue, 27 Oct 2015 09:44:56 -0400 Date: Tue, 27 Oct 2015 14:44:48 +0100 From: Kevin Wolf Message-ID: <20151027134448.GA15916@noname.str.redhat.com> References: <1445891959-27432-1-git-send-email-mreitz@redhat.com> <1445891959-27432-7-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445891959-27432-7-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v8 06/15] blockdev: Add blockdev-remove-medium List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi Am 26.10.2015 um 21:39 hat Max Reitz geschrieben: > Signed-off-by: Max Reitz > + 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