[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: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH 00/15] Protect the block layer with a rwlock: part 3 |
Date: |
Wed, 23 Nov 2022 12:45:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
Am 18/11/2022 um 11:57 schrieb Paolo Bonzini:
> 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
Ah damn I forgot about this, and of course I just sent v5 for "Still
more coroutine and various fixes in block layer".
To me it sounds good, but before I do a massive edit and then someone
asks to revert it, @Kevin and the others do you agree?
Thank you,
Emanuele
>
> ? 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
>
- [PATCH 04/15] block: convert bdrv_refresh_total_sectors in generated_co_wrapper, (continued)
- [PATCH 04/15] block: convert bdrv_refresh_total_sectors in generated_co_wrapper, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 05/15] block: use bdrv_co_refresh_total_sectors when possible, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 08/15] block: convert bdrv_is_inserted in generated_co_wrapper_simple, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 09/15] block-coroutine-wrapper: support void functions, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 12/15] block: convert bdrv_debug_event in generated_co_wrapper, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 14/15] block: convert bdrv_io_unplug in generated_co_wrapper_simple, Emanuele Giuseppe Esposito, 2022/11/16
- [PATCH 15/15] block: rename newly converted BlockDriver IO coroutine functions, Emanuele Giuseppe Esposito, 2022/11/16
- Re: [PATCH 00/15] Protect the block layer with a rwlock: part 3, Paolo Bonzini, 2022/11/18
Re: [PATCH 00/15] Protect the block layer with a rwlock: part 3, Emanuele Giuseppe Esposito, 2022/11/21