On 23/01/19 16:09, Alberto Garcia wrote: > On Wed 23 Jan 2019 10:46:54 AM CET, Paolo Bonzini wrote: >> On 22/01/19 16:53, Alberto Garcia wrote: >>> This patch forbids attaching a disk to a SCSI device if its using a >>> different AioContext. Test case included. >>> >>> Signed-off-by: Alberto Garcia <[email protected]> >> >> Should this be handled in common code? However, everything else looks >> good. Thanks! > > You mean a common function with the code below? > >>> + ctx = blk_get_aio_context(sd->conf.blk); >>> + if (ctx != s->ctx && ctx != qemu_get_aio_context()) { >>> + error_setg(errp, "Cannot attach a blockdev that is using " >>> + "a different iothread"); >>> + return; >>> + } > > Who else would be the user?
If it isn't, probably virtio-blk should be using too. Paolo
