[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO"
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO" |
Date: |
Thu, 28 May 2015 20:04:23 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, 05/28 13:47, Paolo Bonzini wrote:
>
>
> On 28/05/2015 13:44, Fam Zheng wrote:
> > > The reason for doing it in the block layer is that it's in one place and
> > > we can be sure that it's applied. We can still in addition modify
> > > specific users to avoid even trying to send requests, but I think it's
> > > good to have the single place that always ensures correct functionality
> > > of the drain instead of making it dependent on the user.
> >
> > How to do that for the synchronous blk_write callers that don't run in
> > a coroutine?
>
> They would be completely oblivious to it.
>
> Their call to blk_co_write would queue the request. Then blk_write
> calls aio_poll, which ultimately would result in blk_resume and unqueue
> the request.
OK.. I thought that, then we have to make a rule that a blk_pause must be
resolved by an aio_poll() loop. This is somehow tricky, for example I assume
blk_write() would only call aio_poll() of its own AioContext? But the pairing
blk_resume() will be in the main context. To make it worse, what if there is
no BDS in the main context, should it be special cased in the block layer?
Fam
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", (continued)
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Kevin Wolf, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Kevin Wolf, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO",
Fam Zheng <=
[Qemu-devel] [PATCH v6 02/13] block: Add op blocker notifier list, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 03/13] block-backend: Add blk_op_blocker_add_notifier, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 04/13] virtio-blk: Move complete_request to 'ops' structure, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 07/13] nbd-server: Clear "can_read" when "device io" blocker is set, Fam Zheng, 2015/05/21
[Qemu-devel] [PATCH v6 08/13] blockdev: Block device IO during internal snapshot transaction, Fam Zheng, 2015/05/21