From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9HI-0002Bv-A9 for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:56:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go97Y-0002jW-CR for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:46:49 -0500 From: Alberto Garcia In-Reply-To: <20190128145743.GC5756@localhost.localdomain> References: <6ad371df66eecffccce29a0bd14695f40edd6120.1548171741.git.berto@igalia.com> <735410dc-a63e-6a28-4526-2caa810a797d@redhat.com> <20190124091222.GB4601@localhost.localdomain> <20190128145743.GC5756@localhost.localdomain> Date: Mon, 28 Jan 2019 16:46:42 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-scsi: Forbid devices with different iothreads sharing a blockdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi On Mon 28 Jan 2019 03:57:43 PM CET, Kevin Wolf wrote: >> > I think the proper solution on the block layer level would be that >> > AioContext is managed per BdrvChild and only BdrvChild objects with >> > the same AioContext can be attached to the same node. >> > bdrv_set_aio_context() would then fail if another parent is already >> > using the node. >> >> How would that solve the virtio-blk problem, though? :-? > > It wouldn't, but it would make clear that bdrv_set_aio_context() can > fail and we'd have to handle the problem exactly there. Yes, that sound like the proper solution. > The only other option I see is downgrading to non-dataplane mode, but > this would have to be silent because during machine reset we have no > way to report errors. Yes, I actually had a patch doing that, but as you said the user has no way of knowing that it went wrong. If you have 2 or 3 virtio-blk devices with different iothreads using the same BDS then after the guest reboot only one would succeed, but you can't see which one, or can you? Berto