From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKnaJ-0002mU-LA for qemu-devel@nongnu.org; Wed, 27 Mar 2013 06:28:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKnaI-0004ww-EE for qemu-devel@nongnu.org; Wed, 27 Mar 2013 06:27:59 -0400 Received: from mail-bk0-x22c.google.com ([2a00:1450:4008:c01::22c]:52999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKnaI-0004wg-7x for qemu-devel@nongnu.org; Wed, 27 Mar 2013 06:27:58 -0400 Received: by mail-bk0-f44.google.com with SMTP id jk13so1024547bkc.31 for ; Wed, 27 Mar 2013 03:27:57 -0700 (PDT) Date: Wed, 27 Mar 2013 11:27:53 +0100 From: Stefan Hajnoczi Message-ID: <20130327102753.GA6635@stefanha-thinkpad.muc.redhat.com> References: <1364316613-31223-1-git-send-email-kwolf@redhat.com> <1364316613-31223-22-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1364316613-31223-22-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 21/21] qcow2: Gather clusters in a looping loop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com On Tue, Mar 26, 2013 at 05:50:13PM +0100, Kevin Wolf wrote: > @@ -793,6 +793,13 @@ static int handle_dependencies(BlockDriverState *bs, uint64_t guest_offset, > bytes = 0; > } > > + /* Stop if already an l2meta exists. We would have to consider > + * locks held by it (l2_writeback_lock) and set m->next etc. */ l2_writeback_lock does not exist (yet). > + if (bytes == 0 && *m) { > + *cur_bytes = 0; > + return 0; > + }