qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.3 3/4] blockdev: acquire AioContext in eje


From: Max Reitz
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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



reply via email to

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