From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti37Q-00030P-3h for qemu-devel@nongnu.org; Mon, 10 Dec 2012 08:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ti37L-0004Tm-Ns for qemu-devel@nongnu.org; Mon, 10 Dec 2012 08:10:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti37L-0004Te-Ec for qemu-devel@nongnu.org; Mon, 10 Dec 2012 08:09:55 -0500 Message-ID: <50C5DF1C.2050407@redhat.com> Date: Mon, 10 Dec 2012 14:09:48 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1354265746-8390-1-git-send-email-s.priebe@profihost.ag> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv6] rbd block driver fix race between aio completition and aio cancel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Josh Durgin , ceph-devel@vger.kernel.org, Paolo Bonzini , qemu-devel , Stefan Priebe Am 30.11.2012 14:50, schrieb Stefan Hajnoczi: > On Fri, Nov 30, 2012 at 9:55 AM, Stefan Priebe wrote: >> This one fixes a race which qemu had also in iscsi block driver >> between cancellation and io completition. >> >> qemu_rbd_aio_cancel was not synchronously waiting for the end of >> the command. >> >> To archieve this it introduces a new status flag which uses >> -EINPROGRESS. >> >> Changes since PATCHv5: >> - qemu_aio_release has to be done in qemu_rbd_aio_cancel if I/O >> was cancelled >> >> Changes since PATCHv4: >> - removed unnecessary qemu_vfree of acb->bounce as BH will always >> run >> >> Changes since PATCHv3: >> - removed unnecessary if condition in rbd_start_aio as we >> haven't start io yet >> - moved acb->status = 0 to rbd_aio_bh_cb so qemu_aio_wait always >> waits until BH was executed >> >> Changes since PATCHv2: >> - fixed missing braces >> - added vfree for bounce >> >> Signed-off-by: Stefan Priebe >> >> --- >> block/rbd.c | 20 ++++++++++++-------- >> 1 file changed, 12 insertions(+), 8 deletions(-) > > Reviewed-by: Stefan Hajnoczi Thanks, applied to the block branch. For future patches, please put a "---" line between the real commit message (including the SoB, of course) and the changelog so that git am automatically removes the changelog. Kevin