On 09/13/2012 04:35 PM, Paolo Bonzini wrote:
> Il 13/09/2012 17:49, Jeff Cody ha scritto:
>> +typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) 
>> BlockReopenQueue;
>> +
>> +typedef struct BDRVReopenState {
>> +    BlockDriverState *bs;
>> +    int flags;
>> +    void *opaque;
>> +    BlockReopenQueue *queue;
> 
> Do we need the queue pointer here?  Or it can be a separate argument to
> prepare?  Commit and abort don't need it, and it may mess things up a
> bit if commit calls bdrv_reopen_queue (because then the newly-added
> element will get a commit without being prepared).
> 

It could, and should, be a separate argument to prepare(), as you are
correct - commit() and abort() should never use it.

>> +} BDRVReopenState;
>> +
>> +typedef struct BlockReopenQueueEntry {
>> +     bool prepared;
>> +     BDRVReopenState state;
>> +     QSIMPLEQ_ENTRY(BlockReopenQueueEntry) entry;
>> +} BlockReopenQueueEntry;
>> +
> 
> A small change: please move struct BlockReopenQueueEntry to block.c.
> 

OK

Reply via email to