[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio-scsi: Allocate op blocker reason before
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] virtio-scsi: Allocate op blocker reason before blocking |
Date: |
Tue, 24 Feb 2015 10:43:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Max Reitz <address@hidden> writes:
> 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 blk_op_block_all() and
> blk_op_unblock_all() in virtio-scsi.c, respectively.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> Try:
>
> $ echo -e 'eject drv\nquit' | \
> x86_64-softmmu/qemu-system-x86_64 \
> -monitor stdio -machine accel=qtest -display none \
> -object iothread,id=thr -device virtio-scsi-pci,iothread=thr \
> -drive if=none,file=test.qcow2,format=qcow2,id=drv \
> -device scsi-cd,drive=drv
>
> What it should do:
>
> QEMU 2.2.50 monitor - type 'help' for more information
> (qemu) eject drv
> Device 'drv' is busy: block device is in use by data plane
> (qemu) quit
>
> What it should not do:
>
> QEMU 2.2.50 monitor - type 'help' for more information
> (qemu) eject drv
> [1] 10102 done
> 10103 segmentation fault (core dumped)
Why do you put your nice reproducer below the --- divider? I rather
like bug fixing commits come with reproducers in the commit message.
[...]