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