[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 5/5] replay: introduce block devices record/r
From: |
Pavel Dovgalyuk |
Subject: |
Re: [Qemu-devel] [PATCH v4 5/5] replay: introduce block devices record/replay |
Date: |
Mon, 14 Mar 2016 08:53:47 +0300 |
> From: Stefan Hajnoczi [mailto:address@hidden
> On Thu, Mar 10, 2016 at 02:56:20PM +0300, Pavel Dovgalyuk wrote:
> > +static void block_request_create(uint64_t reqid, BlockDriverState *bs,
> > + Coroutine *co)
> > +{
> > + Request *req = g_new(Request, 1);
> > + *req = (Request) {
> > + .co = co,
> > + .bh = aio_bh_new(bdrv_get_aio_context(bs), blkreplay_bh_cb, req),
> > + };
> > + replay_block_event(req->bh, reqid);
>
> Regarding thread safety: is replay_block_event() thread-safe?
It is. Replay module has its own mutex for file and data structures protection.
>
> If QEMU runs with IOThreads then this might not be called under the QEMU
> global mutex.
Pavel Dovgalyuk