Received: from eggs.gnu.org ([2001:4830:134:3::10]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avOHF-0006jz-FR for qemu-devel@nongnu.org; Wed, 27 Apr 2016 08:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avOHA-0005g5-Kd for qemu-devel@nongnu.org; Wed, 27 Apr 2016 08:09:08 -0400 From: Alberto Garcia In-Reply-To: <5720AAD1.9010607@redhat.com> References: <5720AAD1.9010607@redhat.com> Date: Wed, 27 Apr 2016 14:08:25 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Eric Blake , Stefan Hajnoczi On Wed 27 Apr 2016 02:04:33 PM CEST, Max Reitz wrote: >> - bs = NULL; >> - while ((bs = bdrv_next(bs))) { >> - AioContext *aio_context = bdrv_get_aio_context(bs); >> + while ((job = block_job_next(job))) { >> + AioContext *aio_context = bdrv_get_aio_context(job->bs); > > Technically, the "bs = NULL;" before didn't do anything either. But in > my opinion, it made the code more readable, therefore I'd really like > a "job = NULL;" before this loop, too. Looks reasonable, I'll update it in the next revision. Berto