From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] virtio-scsi: Allocate op blocker reason before blocking
Date: Fri, 27 Feb 2015 10:45:18 -0700 [thread overview]
Message-ID: <54F0AD2E.3010904@redhat.com> (raw)
In-Reply-To: <1425057113-26940-1-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]
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 <mreitz@redhat.com>
> ---
> 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 <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-02-27 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 17:11 [Qemu-devel] [PATCH v2] virtio-scsi: Allocate op blocker reason before blocking Max Reitz
2015-02-27 17:45 ` Eric Blake [this message]
2015-02-27 18:43 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F0AD2E.3010904@redhat.com \
--to=eblake@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.