From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoBAl-0006Q6-Cn for qemu-devel@nongnu.org; Tue, 02 Aug 2011 05:22:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoBAk-000847-DX for qemu-devel@nongnu.org; Tue, 02 Aug 2011 05:21:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoBAk-000843-6a for qemu-devel@nongnu.org; Tue, 02 Aug 2011 05:21:58 -0400 Message-ID: <4E37C265.60307@redhat.com> Date: Tue, 02 Aug 2011 11:24:53 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1311914994-20482-1-git-send-email-devin122@gmail.com> <1311914994-20482-2-git-send-email-devin122@gmail.com> <20110802085649.GA8912@stefanha-thinkpad.localdomain> In-Reply-To: <20110802085649.GA8912@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 01/24] block: add block conversion api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Devin Nakamura , qemu-devel@nongnu.org Am 02.08.2011 10:56, schrieb Stefan Hajnoczi: >> @@ -263,4 +345,10 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf) >> DEFINE_PROP_UINT32("discard_granularity", _state, \ >> _conf.discard_granularity, 0) >> >> +struct BlockConversionOptions { >> + int encryption_type; >> + uint64_t image_size; >> + uint64_t cluster_size; > > These two fields can be extracted using existing block.h APIs. Does it > make sense to add a bdrv_get_encryption_type() instead? That way > qemu-img info can also show display the encryption type and you can drop > this struct. Hm... We already have BlockDriverInfo, which is used by qemu-img. Would it make sense to add the fields there? In any case I would prefer something that fills a whole struct at once instead of calling ten separate functions and building the struct in the caller. Kevin