qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files s


From: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely
Date: Thu, 13 Sep 2012 16:51:14 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

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

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