From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkWL3-0008Jd-N5 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 09:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkWKy-0003hK-DA for qemu-devel@nongnu.org; Thu, 15 Sep 2016 09:04:25 -0400 Date: Thu, 15 Sep 2016 15:04:06 +0200 From: Kevin Wolf Message-ID: <20160915130406.GG4726@noname.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz Am 14.09.2016 um 17:52 hat Alberto Garcia geschrieben: > bdrv_reopen_queue_child() assumes that a BlockDriverState is never > added twice to BlockReopenQueue. > > That's however not the case: commit_start() adds 'base' (and its > children) to a new reopen queue, and then 'overlay_bs' (and its > children, which include 'base') to the same queue. The effect of this > is that the first set of options is ignored and overriden by the > second. > > We fixed this by swapping the order in which both BDSs were added to > the queue in 3db2bd5508c86a1605258bc77c9672d93b5c350e. This patch > checks if a BDS is already in the reopen queue and keeps its options. > > Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf