All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.3 3/4] blockdev: acquire AioContext in eject, change, and block_passwd
Date: Thu, 20 Nov 2014 10:27:19 +0100	[thread overview]
Message-ID: <546DB3F7.1060708@redhat.com> (raw)
In-Reply-To: <1416406785-14241-4-git-send-email-stefanha@redhat.com>

On 2014-11-19 at 15:19, Stefan Hajnoczi wrote:
> By acquiring the AioContext we avoid race conditions with the dataplane
> thread which may also be accessing the BlockDriverState.
>
> Fix up eject, change, and block_passwd in a single patch because
> qmp_eject() and qmp_change_blockdev() both call eject_device().  Also
> fix block_passwd while we're tackling a command that takes a block
> encryption password.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   blockdev.c                      | 36 +++++++++++++++++++++++++++++-------
>   hw/block/dataplane/virtio-blk.c |  1 +
>   2 files changed, 30 insertions(+), 7 deletions(-)

You could've used blk_get_aio_context() for acquiring the AioContext in 
qmp_eject() instead of in eject_device() (and qmp_change_blockdev(), 
which is the other caller of eject_device(), holds the context anyway).

Anyway:

Reviewed-by: Max Reitz <mreitz@redhat.com>

  reply	other threads:[~2014-11-20  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 14:19 [Qemu-devel] [PATCH for-2.3 0/4] blockdev: support dataplane in remaining QMP commands Stefan Hajnoczi
2014-11-19 14:19 ` [Qemu-devel] [PATCH for-2.3 1/4] blockdev: acquire AioContext in blockdev-snapshot-delete-internal-sync Stefan Hajnoczi
2014-11-20  9:06   ` Max Reitz
2014-11-19 14:19 ` [Qemu-devel] [PATCH for-2.3 2/4] blockdev: check for BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE Stefan Hajnoczi
2014-11-20  9:07   ` Max Reitz
2014-11-19 14:19 ` [Qemu-devel] [PATCH for-2.3 3/4] blockdev: acquire AioContext in eject, change, and block_passwd Stefan Hajnoczi
2014-11-20  9:27   ` Max Reitz [this message]
2014-11-19 14:19 ` [Qemu-devel] [PATCH for-2.3 4/4] blockdev: acquire AioContext in change-backing-file Stefan Hajnoczi
2014-11-20  9:37   ` Max Reitz
2014-11-20  9:45 ` [Qemu-devel] [PATCH for-2.3 0/4] blockdev: support dataplane in remaining QMP commands Max Reitz

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=546DB3F7.1060708@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.