[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/12] introduce BDRV_POLL_WHILE_UNLOCKED
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 01/12] introduce BDRV_POLL_WHILE_UNLOCKED |
Date: |
Wed, 26 Jan 2022 10:49:52 +0000 |
On Tue, Jan 18, 2022 at 11:27:27AM -0500, Emanuele Giuseppe Esposito wrote:
> Same as BDRV_POLL_WHILE, but uses AIO_WAIT_WHILE_UNLOCKED.
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> include/block/block-global-state.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/block/block-global-state.h
> b/include/block/block-global-state.h
> index 419fe8427f..7ad9496f56 100644
> --- a/include/block/block-global-state.h
> +++ b/include/block/block-global-state.h
> @@ -158,6 +158,11 @@ void bdrv_drain_all(void);
> AIO_WAIT_WHILE(bdrv_get_aio_context(bs_), \
> cond); })
>
> +#define BDRV_POLL_WHILE_UNLOCKED(bs, cond) ({ \
> + BlockDriverState *bs_ = (bs); \
> + AIO_WAIT_WHILE_UNLOCKED(bdrv_get_aio_context(bs_), \
> + cond); })
No doc comments? When and why is this API useful? Are there any
preconditions or assumptions (e.g. cond must be thread-safe)?
Stefan
signature.asc
Description: PGP signature
- [PATCH 00/12] Removal of Aiocontext lock through drains: protect bdrv_replace_child_noperm., Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 05/12] test-bdrv-drain.c: adapt test to the coming subtree drains, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 01/12] introduce BDRV_POLL_WHILE_UNLOCKED, Emanuele Giuseppe Esposito, 2022/01/18
- Re: [PATCH 01/12] introduce BDRV_POLL_WHILE_UNLOCKED,
Stefan Hajnoczi <=
- [PATCH 09/12] jobs: ensure sleep in job_sleep_ns is fully performed, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 08/12] reopen: add a transaction to drain_end nodes picked in bdrv_reopen_parse_file_or_backing, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 10/12] block.c: add subtree_drains where needed, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 12/12] block.c: additional assert qemu in main tread, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 06/12] test-bdrv-drain.c: remove test_detach_by_parent_cb(), Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 03/12] block.c: bdrv_replace_child_noperm: first remove the child, and then call ->detach(), Emanuele Giuseppe Esposito, 2022/01/18