qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/15] Protect the block layer with a rwlock: part 3


From: Paolo Bonzini
Subject: Re: [PATCH 00/15] Protect the block layer with a rwlock: part 3
Date: Fri, 18 Nov 2022 11:57:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

On 11/16/22 15:07, Emanuele Giuseppe Esposito wrote:
Here we introduce generated_co_wrapper_simple, a simplification of g_c_w that
only considers the case where the caller is not in a coroutine.
This simplifies and clarifies a lot when the caller is a coroutine or not, and
in the future will hopefully replace g_c_w.

This is a good idea!

Just one thing, though it belongs more in the two series which introduced generated_co_wrapper_simple and generated_co_wrapper_blk - I would make this the "official" wrapper. So perhaps:

- generated_co_wrapper_simple -> coroutine_wrapper
- generated_co_wrapper_blk -> coroutine_wrapper_mixed
- generated_co_wrapper -> coroutine_wrapper_mixed_bdrv

? It is not clear to me yet if you will have bdrv_* functions that take the rdlock as well - in which case however coroutine_wrapper_bdrv would not be hard to add.

Even without looking at the lock, the three series are going in the right direction of ultimately having more "simple" coroutine wrappers at the blk_* level and more coroutine functions (ultimately less wrappers, too) at the bdrv_* level.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]