From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCG8k-0000OK-O4 for qemu-devel@nongnu.org; Thu, 13 Sep 2012 16:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCG8j-0004Bs-P2 for qemu-devel@nongnu.org; Thu, 13 Sep 2012 16:35:58 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:41913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCG8j-0004Bn-IT for qemu-devel@nongnu.org; Thu, 13 Sep 2012 16:35:57 -0400 Received: by weyz53 with SMTP id z53so1874458wey.4 for ; Thu, 13 Sep 2012 13:35:56 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <505243A9.7050004@redhat.com> Date: Thu, 13 Sep 2012 22:35:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <392c2852363a2cb420a1c53e7b13e85bc4ebf089.1347548248.git.jcody@redhat.com> In-Reply-To: <392c2852363a2cb420a1c53e7b13e85bc4ebf089.1347548248.git.jcody@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 03/16] block: Framework for reopening files safely List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, stefanha@gmail.com, eblake@redhat.com, qemu-devel@nongnu.org, supriyak@linux.vnet.ibm.com 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). > +} BDRVReopenState; > + > +typedef struct BlockReopenQueueEntry { > + bool prepared; > + BDRVReopenState state; > + QSIMPLEQ_ENTRY(BlockReopenQueueEntry) entry; > +} BlockReopenQueueEntry; > + A small change: please move struct BlockReopenQueueEntry to block.c. Paolo