qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] virtio-scsi: Allocate op blocker reason befo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] virtio-scsi: Allocate op blocker reason before blocking
Date: Fri, 27 Feb 2015 10:45:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 02/27/2015 10:11 AM, Max Reitz wrote:
> s->blocker is really only used in hw/scsi/virtio-scsi.c; the only places
> where it is used in hw/scsi/virtio-scsi-dataplane.c is when it is
> allocated and when it is freed. That does not make a whole lot of sense
> (and is actually wrong because this leads to s->blocker potentially
> being NULL when blk_op_block_all() is called in virtio-scsi.c), so move
> the allocation and destruction of s->blocker to the device realization
> and unrealization in virtio-scsi.c, respectively.
> 

> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
> v2:
> - Put the reproducer into the commit message [Markus] and modified its
>   wording to be more fitting of a commit message ("Case in point"
>   instead of the imperative "Try").
> - As noted by Fam on my bdrv_close_all() series, there can be multiple
>   block devices per virtio-scsi bus; therefore, it's wrong to delete the
>   blocker if one of these is unplugged. Instead, just allocate the
>   blocker with the virtio-scsi device itself and free it when the device
>   is unrealized.
> ---
>  hw/scsi/virtio-scsi-dataplane.c | 4 ----
>  hw/scsi/virtio-scsi.c           | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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