qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 10/11] block: let commit blockjob run in BDS


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 10/11] block: let commit blockjob run in BDS AioContext
Date: Tue, 21 Oct 2014 13:28:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2014-10-21 at 13:03, Stefan Hajnoczi wrote:
The commit block job must run in the BlockDriverState AioContext so that
it works with dataplane.

Acquire the AioContext in blockdev.c so starting the block job is safe.
One detail here is that the bdrv_drain_all() must be moved inside the
aio_context_acquire() region so requests cannot sneak in between the
drain and acquire.

The completion code in block/commit.c must perform backing chain
manipulation and bdrv_reopen() from the main loop.  Use
block_job_defer_to_main_loop() to achieve that.

Signed-off-by: Stefan Hajnoczi <address@hidden>
---
  block/commit.c | 70 ++++++++++++++++++++++++++++++++++++----------------------
  blockdev.c     | 29 ++++++++++++++++--------
  2 files changed, 64 insertions(+), 35 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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