From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fftl7-0004vk-Sn for qemu-devel@nongnu.org; Wed, 18 Jul 2018 17:13:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fftl3-00072D-R5 for qemu-devel@nongnu.org; Wed, 18 Jul 2018 17:13:17 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:38828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fftl3-00071g-Jt for qemu-devel@nongnu.org; Wed, 18 Jul 2018 17:13:13 -0400 Received: by mail-pl0-x244.google.com with SMTP id b1-v6so2584225pls.5 for ; Wed, 18 Jul 2018 14:13:13 -0700 (PDT) From: Nishanth Aravamudan Date: Wed, 18 Jul 2018 14:12:56 -0700 Message-Id: <20180718211256.29774-1-naravamudan@digitalocean.com> Subject: [Qemu-devel] [PATCH] block/file-posix: add bdrv_attach_aio_context callback for host dev and cdrom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: naravamudan@digitalocean.com Cc: Farhan Ali , Eric Blake , Kevin Wolf , John Snow , Max Reitz , Stefan Hajnoczi , Fam Zheng , Paolo Bonzini , qemu-block@nongnu.org, qemu-devel@nongnu.org In ed6e2161 ("linux-aio: properly bubble up errors from initialzation"), I only added a bdrv_attach_aio_context callback for the bdrv_file driver. There are several other drivers that use the shared aio_plug callback, though, and they will trip the assertion added to aio_get_linux_aio because they did not call aio_setup_linux_aio first. Add the appropriate callback definition to the affected driver definitions. Fixes: ed6e2161 ("linux-aio: properly bubble up errors from initialization") Reported-by: Farhan Ali Signed-off-by: Nishanth Aravamudan Cc: Eric Blake Cc: Kevin Wolf Cc: John Snow Cc: Max Reitz Cc: Stefan Hajnoczi Cc: Fam Zheng Cc: Paolo Bonzini Cc: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org --- block/file-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 60af4b3d51..ad299beb38 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -3158,6 +3158,7 @@ static BlockDriver bdrv_host_device = { .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, + .bdrv_attach_aio_context = raw_aio_attach_aio_context, .bdrv_co_truncate = raw_co_truncate, .bdrv_getlength = raw_getlength, @@ -3280,6 +3281,7 @@ static BlockDriver bdrv_host_cdrom = { .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, + .bdrv_attach_aio_context = raw_aio_attach_aio_context, .bdrv_co_truncate = raw_co_truncate, .bdrv_getlength = raw_getlength, @@ -3410,6 +3412,7 @@ static BlockDriver bdrv_host_cdrom = { .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, + .bdrv_attach_aio_context = raw_aio_attach_aio_context, .bdrv_co_truncate = raw_co_truncate, .bdrv_getlength = raw_getlength, -- 2.17.1