[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 00/16] block: Protect AIO context change with
Re: [Qemu-block] [PATCH v2 00/16] block: Protect AIO context change with perm API
Thu, 11 May 2017 16:43:15 -0400
On Wed, Apr 19, 2017 at 05:43:40PM +0800, Fam Zheng wrote:
> v2: Address Stefan's comments:
> - Clean up redundancy in bdrv_format_default_perms change.
> - Add a test case to check both success/failure cases.
> A failure case is not possible at user interface level because of other
> checks we have, so write a unit test in tests/test-blk-perm.c.
> Eject / change of scsi-cd on a virtio-scsi dataplane bus causes abort()
> the new BDS doesn't get proper bdrv_set_aio_context().
> Store the AioContext in BB and do it in blk_insert_bs. That is done by
> Vladimir's patch.
> Other patches are to make sure such a bdrv_set_aio_context() doesn't interfere
> with other BBs using other nodes from this graph.
Looks pretty good. I had two comments that apply across all patches:
First, it is not safe to enable the new permission without registering
an aio notifier. Another user could look up the BDS and call
bdrv_set_aio_context() on it. I believe this bug is present for block
jobs that have additional BDSes like base/target/etc.
Second, patches that post-pone bdrv_set_aio_context() must take care to
acquire the AioContext for BDS accesses that happen before the next
Description: PGP signature
|[Prev in Thread]
||[Next in Thread]|
- Re: [Qemu-block] [PATCH v2 00/16] block: Protect AIO context change with perm API,
Stefan Hajnoczi <=