qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Revert "blockdev: add note that block_job_cb()


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] Revert "blockdev: add note that block_job_cb() must be thread-safe"
Date: Wed, 14 Oct 2015 15:51:45 +0200
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Oct 13, 2015 at 06:16:15PM +0800, Fam Zheng wrote:
> This reverts commit 723c5d93c51bdb3adbc238ce90195c0864aa6cd5.
> 
> block_job_cb is called by block_job_completed, which is always called in
> a main loop bottom half in existing block jobs. So we don't need to
> worry about thread-safety here.

This is not correct.  Search for block_job_completed() callers.

For example, block/stream.c has early exit cases that call
block_job_completed() from the coroutine (i.e. dispatched from a
coroutine in another AioContext+IOThread).

I think you are assuming that all block_job_completed() callers are
called from a function scheduled using block_job_defer_to_main_loop().

Please double-check this.

Thanks,
Stefan



reply via email to

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