qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 01/24] block: add block conversion api


From: Kevin Wolf
Subject: Re: [Qemu-devel] [RFC 01/24] block: add block conversion api
Date: Tue, 02 Aug 2011 11:24:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]