From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4qFV-0002MB-CX for qemu-devel@nongnu.org; Fri, 04 Dec 2015 08:18:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4qFU-0004A2-JW for qemu-devel@nongnu.org; Fri, 04 Dec 2015 08:18:09 -0500 Date: Fri, 4 Dec 2015 14:18:00 +0100 From: Kevin Wolf Message-ID: <20151204131800.GA4655@noname.redhat.com> References: <1448294400-476-1-git-send-email-kwolf@redhat.com> <1448294400-476-4-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 03/21] mirror: Error out when a BDS would get two BBs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Am 30.11.2015 um 15:51 hat Alberto Garcia geschrieben: > On Mon 23 Nov 2015 04:59:42 PM CET, Kevin Wolf wrote: > > > @@ -370,11 +371,22 @@ static void mirror_exit(BlockJob *job, void *opaque) > > if (s->to_replace) { > > to_replace = s->to_replace; > > } > > + > > + /* This was checked in mirror_start_job(), but meanwhile one of the > > + * nodes could have been newly attached to a BlockBackend. */ > > + if (to_replace->blk && s->target->blk) { > > + error_report("block job: Can't create node with two BlockBackends"); > > + data->ret = -EINVAL; > > + goto out; > > + } > > Does it make sense to even allow attaching a BDS to a Block Backend > during this block job? Is there any use case for that? Well, is there a good reason for forbidding it? I can imagine that someone could have good reasons to start an NBD server on any node, including nodes that are going to be replaced at some point. The only reason for not allowing this is that a BDS can only have a single BB, which is a limitation of the implementation rather than a fundamental problem. Kevin