qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 05/11] blockjob: add block_job_defer_to_main_


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 05/11] blockjob: add block_job_defer_to_main_loop()
Date: Tue, 21 Oct 2014 13:24:21 +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:
Block jobs will run in the BlockDriverState's AioContext, which may not
always be the QEMU main loop.

There are some block layer APIs that are either not thread-safe or risk
lock ordering problems.  This includes bdrv_unref(), bdrv_close(), and
anything that calls bdrv_drain_all().

The block_job_defer_to_main_loop() API allows a block job to schedule a
function to run in the main loop with the BlockDriverState AioContext
held.

This function will be used to perform cleanup and backing chain
manipulations in block jobs.

Signed-off-by: Stefan Hajnoczi <address@hidden>
---
  blockjob.c               | 45 +++++++++++++++++++++++++++++++++++++++++++++
  include/block/blockjob.h | 19 +++++++++++++++++++
  2 files changed, 64 insertions(+)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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