[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_R
From: |
Kevin Wolf |
Subject: |
Re: [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK |
Date: |
Wed, 28 Jun 2023 09:40:52 +0200 |
Am 01.06.2023 um 13:51 hat Paolo Bonzini geschrieben:
> Mark functions as coroutine_fn when they are only called by other
> coroutine_fns
> and they can suspend. Change calls to co_wrappers to use the non-wrapped
> functions, which in turn requires adding GRAPH_RDLOCK annotations.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> @@ -1036,8 +1037,9 @@ exit:
> }
>
> /* Perform a log write, and then immediately flush the entire log */
> -int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
> - void *data, uint32_t length, uint64_t offset)
> +int coroutine_fn GRAPH_RDLOCK
> +vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
> + void *data, uint32_t length, uint64_t offset)
> {
> int ret = 0;
> VHDXLogSequence logs = { .valid = true,
This is a public function, so GRAPH_RDLOCK needs to move to the header
so that callers in other source files are actually checked. I can fix
this up while applying.
Kevin
- Re: [PATCH 01/12] file-posix: remove incorrect coroutine_fn calls, (continued)
- [PATCH 03/12] vpc: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 05/12] block: mark another function as coroutine_fns and GRAPH_UNLOCKED, Paolo Bonzini, 2023/06/01
- [PATCH 04/12] bochs: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 06/12] cloop: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 02/12] qed: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 08/12] vmdk: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 11/12] block: use bdrv_co_getlength in coroutine context, Paolo Bonzini, 2023/06/01
- [PATCH 07/12] dmg: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- Re: [PATCH 09/12] vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK,
Kevin Wolf <=
- [PATCH 10/12] qcow2: mark more functions as coroutine_fns and GRAPH_RDLOCK, Paolo Bonzini, 2023/06/01
- [PATCH 12/12] block: use bdrv_co_debug_event in coroutine context, Paolo Bonzini, 2023/06/01
- Re: [PATCH 00/12] block: more fixes to coroutine_fn marking, Kevin Wolf, 2023/06/28