Received: from eggs.gnu.org ([2001:4830:134:3::10]:35874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVzk5-0007RQ-Ef for qemu-devel@nongnu.org; Wed, 17 Feb 2016 05:53:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVzk1-0006NT-Ki for qemu-devel@nongnu.org; Wed, 17 Feb 2016 05:53:57 -0500 Date: Wed, 17 Feb 2016 11:53:45 +0100 From: Kevin Wolf Message-ID: <20160217105345.GE29494@noname.str.redhat.com> References: <1455646106-2047-1-git-send-email-mreitz@redhat.com> <1455646106-2047-8-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455646106-2047-8-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 07/14] blockdev: Add list of monitor-owned BlockBackends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, qemu-block@nongnu.org, Markus Armbruster Am 16.02.2016 um 19:08 hat Max Reitz geschrieben: > The monitor does hold references to some BlockBackends so it should have s/does hold/holds/? > a list of those BBs; blk_backends is a different list, as it contains > references to all BBs (after a follow-up patch, that is), and that > should not be changed because we do need such a list. > > monitor_remove_blk() is idempotent so that we can call it in > blockdev_auto_del() without having to care whether it had been called in > do_drive_del() before. monitor_add_blk() is idempotent for symmetry > reasons (monitor_remove_blk() is, so it would be strange for > monitor_add_blk() not to be). > > Signed-off-by: Max Reitz I think hmp_drive_add() needs a monitor_remove_blk() in its error path. Kevin