Received: from eggs.gnu.org ([208.118.235.92]:36248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMkqP-0004zl-G1 for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMkqO-0002fC-1z for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:56:41 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:48552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMkqN-0002ez-Rv for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:56:39 -0400 Date: Mon, 01 Apr 2013 20:56:24 +0000 From: Alex Bligh Message-ID: <358184A5C86D79E1A4CD05CA@nimrod.local> In-Reply-To: References: <66DB172ECC6AABDC49D0E5A4@Ximines.local> <1364830345-29527-1-git-send-email-alex@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH] [RFC] Xen PV backend: Move call to bdrv_new from blk_init to blk_connect Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , qemu-devel@nongnu.org, xen-devel , Anthony Liguori , Paolo Bonzini , Alex Bligh Stefano, --On 1 April 2013 16:44:05 +0100 Stefano Stabellini wrote: >> Note this patch is compile-tested only. > > I think the patch looks good, just a minor comment. Thanks. I guess I ought to actually test it works then :-) >> + /* fill info >> + * Temporarily write zero sectors as we won't know file size until >> + * bdrv_new has been called. blk_connect corrects this. >> + */ >> + xenstore_write_be_int(&blkdev->xendev, "feature-flush-cache", 1); >> + xenstore_write_be_int(&blkdev->xendev, "feature-persistent", 1); >> + xenstore_write_be_int(&blkdev->xendev, "info", info); >> + xenstore_write_be_int(&blkdev->xendev, "sector-size", BLOCK_SIZE); >> + xenstore_write_be_int(&blkdev->xendev, "sectors", 0); >> + return 0; > > There is no need to fill the sector-size and sectors info here, you can > do it later in blk_connect. My concern (not knowing how xenstore works) was the possibility of leaving them as uninitialized values. I'm taking it that if I don't initialise them, the key is just absent - correct? I'll redo and move setting sector-size and sectors into blk_connect, and then add a second commit which removes BDRV_O_NOCACHE. Oh, and test it ... -- Alex Bligh