qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/11] block: let stream blockjob run in BDS Aio


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 08/11] block: let stream blockjob run in BDS AioContext
Date: Sat, 04 Oct 2014 22:48:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 01.10.2014 19:01, Stefan Hajnoczi wrote:
The stream block job must run in the BlockDriverState AioContext so that
it works with dataplane.

The basics of acquiring the AioContext are easy in blockdev.c.

The tricky part is the completion code which drops part of the backing
file chain.  This must be done in the main loop where bdrv_unref() and
bdrv_close() are safe to call.  Use block_job_defer_to_main_loop() to
achieve that.

Signed-off-by: Stefan Hajnoczi <address@hidden>
---
  block/stream.c | 50 ++++++++++++++++++++++++++++++++++++--------------
  blockdev.c     | 16 ++++++++++++----
  2 files changed, 48 insertions(+), 18 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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