From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamala Narasimhan Subject: Re: [RFC] xl disk configuration handling Date: Tue, 01 Feb 2011 09:00:35 -0500 Message-ID: <4D481203.1090507@gmail.com> References: <4D45A410.4000304@gmail.com> <4D471955.8070103@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> do we really need to change the parsing function that much? I >>> understand there are significant changes but this is a total rewrite. >>> I am concerned about all the bugs we might find later after the >>> release... >>> >> This is one change I would really like to go with. Not only does it help with >> the changes we needed, it also gets rid of code duplication. With this change >> block-attach can rely on the same parsing code (that is once I submit the >> block-attach changes patch). > > It took us several iterations to get the parsing right, I would like to > keep the state machine and the field parsing as it is, but each case > could have its own function to implement it. In other words, would you > be OK with calling parse_disk_attrib, parse_disk_vdev_info and > parse_disk_pdev_info from the main switch under DSTATE_PHYSPATH, > DSTATE_VIRTPATH, etc? Sure, I will go with appropriate DSTATE_* for each chunk we parse. Kamala