qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] virtio-scsi: Forbid devices with different


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-scsi: Forbid devices with different iothreads sharing a blockdev
Date: Wed, 23 Jan 2019 16:47:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

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 <address@hidden>
>>
>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]