From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afLY6-00029T-HG for qemu-devel@nongnu.org; Mon, 14 Mar 2016 02:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afLY5-00061K-P7 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 02:00:14 -0400 Message-ID: <56E653E0.9030808@cn.fujitsu.com> Date: Mon, 14 Mar 2016 14:02:08 +0800 From: Changlong Xie MIME-Version: 1.0 References: <1457578181-27111-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1457578181-27111-3-git-send-email-xiecl.fnst@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v12 2/3] quorum: implement bdrv_add_child() and bdrv_del_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu devel , Eric Blake , Kevin Wolf , Max Reitz , Stefan Hajnoczi Cc: qemu block , Jiang Yunhong , Dong Eddie , Markus Armbruster , "Dr. David Alan Gilbert" , Gonglei , zhanghailiang On 03/11/2016 08:21 PM, Alberto Garcia wrote: > On Thu 10 Mar 2016 03:49:40 AM CET, Changlong Xie wrote: >> @@ -81,6 +82,8 @@ typedef struct BDRVQuorumState { >> bool rewrite_corrupted;/* true if the driver must rewrite-on-read corrupted >> * block if Quorum is reached. >> */ >> + unsigned long *index_bitmap; Hi Berto *NOTE*, In the old version, we just used "bs->node_name", but in the lastest one, as Kevin suggested we introduce "child->child_name"(formart as "children.xxx"), this is the key cause why we need this two functions here. Thanks -Xie >> + int bsize; > [...] >> +static int get_new_child_index(BDRVQuorumState *s) > [...] >> +static void remove_child_index(BDRVQuorumState *s, int index) > [...] > > Sorry if I missed a previous discussion, but why is this necessary? > > Berto > > > . >