From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W271h-00058M-FB for qemu-devel@nongnu.org; Sat, 11 Jan 2014 17:27:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W271b-0003jx-FQ for qemu-devel@nongnu.org; Sat, 11 Jan 2014 17:27:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W271b-0003jc-6v for qemu-devel@nongnu.org; Sat, 11 Jan 2014 17:27:27 -0500 Message-ID: <52D1C5AD.6070405@redhat.com> Date: Sat, 11 Jan 2014 23:29:01 +0100 From: Max Reitz MIME-Version: 1.0 References: <1386940979-3824-1-git-send-email-kwolf@redhat.com> <1386940979-3824-20-git-send-email-kwolf@redhat.com> In-Reply-To: <1386940979-3824-20-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 19/24] block: Allow wait_serialising_requests() at any point List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, pl@kamp.de, stefanha@redhat.com On 13.12.2013 14:22, Kevin Wolf wrote: > We can only have a single wait_serialising_requests() call per request > because otherwise we can run into deadlocks where requests are waiting > for each other. The same is true when wait_serialising_requests() is not > at the very beginning of a request, so that other requests can be issued > between the start of the tracking and wait_serialising_requests(). > > Fix this by changing wait_serialising_requests() to ignore requests that > are already (directly or indirectly) waiting for the calling request. > > Signed-off-by: Kevin Wolf > --- > block.c | 26 +++++++++++++++++++++++--- > include/block/block_int.h | 2 ++ > 2 files changed, 25 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz