From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlTRG-00013N-2e for qemu-devel@nongnu.org; Tue, 26 Nov 2013 19:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlTRA-0006m0-3F for qemu-devel@nongnu.org; Tue, 26 Nov 2013 19:57:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlTR9-0006lo-Rn for qemu-devel@nongnu.org; Tue, 26 Nov 2013 19:57:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAR0v2k3008554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Nov 2013 19:57:03 -0500 Message-ID: <52954357.3080702@redhat.com> Date: Wed, 27 Nov 2013 08:56:55 +0800 From: Fam Zheng MIME-Version: 1.0 References: <1385438728-17924-1-git-send-email-famz@redhat.com> <1385438728-17924-6-git-send-email-famz@redhat.com> <5294C9BF.1010405@redhat.com> In-Reply-To: <5294C9BF.1010405@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 5/7] block: Parse "backing" option to reference existing BDS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, imain@redhat.com, stefanha@redhat.com On 2013=E5=B9=B411=E6=9C=8827=E6=97=A5 00:18, Paolo Bonzini wrote: > Il 26/11/2013 05:05, Fam Zheng ha scritto: >> + if (backing_bs && *backing_bs !=3D '\0') { >> + bs->backing_hd =3D bdrv_find(backing_bs); >> + if (!bs->backing_hd) { >> + error_setg(errp, "Backing device not found: %s", backing_= bs); >> + return -ENOENT; >> + } >> + bdrv_ref(bs->backing_hd); >> + assert(!bs->backing_blocker); >> + error_setg(&bs->backing_blocker, >> + "device is used as backing hd of '%s'", >> + bs->device_name); >> + bdrv_op_block_all(bs->backing_hd, bs->backing_blocker); > > Why should this blocker only apply to the "named backing file" case, an= d > not to all backing files? > Good point, thanks. Fam