[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/12] block/io.c: introduce bdrv_subtree_drained_{begin/end}
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 07/12] block/io.c: introduce bdrv_subtree_drained_{begin/end}_unlocked |
Date: |
Wed, 26 Jan 2022 11:04:31 +0000 |
On Tue, Jan 18, 2022 at 11:27:33AM -0500, Emanuele Giuseppe Esposito wrote:
> diff --git a/block/io.c b/block/io.c
> index 5123b7b713..9d5167f64a 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -244,6 +244,7 @@ typedef struct {
> bool begin;
> bool recursive;
> bool poll;
> + bool unlock;
> BdrvChild *parent;
> bool ignore_bds_parents;
> int *drained_end_counter;
...
> @@ -473,23 +477,35 @@ static void bdrv_do_drained_begin(BlockDriverState *bs,
> bool recursive,
> */
> if (poll) {
> assert(!ignore_bds_parents);
> - BDRV_POLL_WHILE(bs, bdrv_drain_poll_top_level(bs, recursive,
> parent));
> + if (unlock) {
"Unlock" is a verb that suggests we'll perform an unlock operation.
Please call it "unlocked" instead.
> + BDRV_POLL_WHILE_UNLOCKED(bs,
> + bdrv_drain_poll_top_level(bs, recursive,
> + parent));
> + } else {
> + BDRV_POLL_WHILE(bs,
> + bdrv_drain_poll_top_level(bs, recursive,
> parent));
> + }
> }
> }
signature.asc
Description: PGP signature
- [PATCH 06/12] test-bdrv-drain.c: remove test_detach_by_parent_cb(), (continued)
- [PATCH 06/12] test-bdrv-drain.c: remove test_detach_by_parent_cb(), Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 12/12] block.c: additional assert qemu in main tread, 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 04/12] block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 02/12] block/io.c: make bdrv_do_drained_begin_quiesce static and introduce bdrv_drained_begin_no_poll, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 07/12] block/io.c: introduce bdrv_subtree_drained_{begin/end}_unlocked, Emanuele Giuseppe Esposito, 2022/01/18
- [PATCH 11/12] block/io.c: fully enable assert_bdrv_graph_writable, Emanuele Giuseppe Esposito, 2022/01/18
- Re: [PATCH 00/12] Removal of Aiocontext lock through drains: protect bdrv_replace_child_noperm., Paolo Bonzini, 2022/01/19
- Re: [PATCH 00/12] Removal of Aiocontext lock through drains: protect bdrv_replace_child_noperm., Stefan Hajnoczi, 2022/01/26