[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 29/33] job.h: assertions in the callers of JobDriver funci
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH v6 29/33] job.h: assertions in the callers of JobDriver funcion pointers |
Date: |
Fri, 28 Jan 2022 16:19:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 26/01/2022 15:13, Hanna Reitz wrote:
> On 21.01.22 18:05, Emanuele Giuseppe Esposito wrote:
>> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
>> ---
>> job.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>
> Just curious, why did you remove the assertion in job_co_entry()?
> (Looking at it again, it might have been nicer to swap it with the
> assertion below it, so that `job != NULL` is asserted first, but other
> than that...)
>
I think it's useless, job_co_entry runs in a coroutine in
job->aio_context created and entered in job_start (its only caller), so
there is no way that we are in a different aiocontext.
Same as assert(job), I don't think the opaque pointer can ever be NULL.
Thank you,
Emanuele
> (And since I’m already replying to this patch, might as well point out
> s/funcion/function/ in the subject)
>
> Hanna
>
- [PATCH v6 10/33] include/block/blockjob_int.h: split header into I/O and GS API, (continued)
- [PATCH v6 10/33] include/block/blockjob_int.h: split header into I/O and GS API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 13/33] include/block/blockjob.h: global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 07/33] include/block/block_int: split header into I/O and global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 15/33] include/sysemu/blockdev.h: global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 12/33] block.c: add assertions to static functions, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 14/33] assertions for blockjob.h global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 09/33] block: introduce assert_bdrv_graph_writable, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 11/33] assertions for blockjob_int.h, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 29/33] job.h: assertions in the callers of JobDriver funcion pointers, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 18/33] block/copy-before-write.h: global state API + assertions, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 24/33] block_int-common.h: assertions in the callers of BlockDriver function pointers, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 16/33] assertions for blockdev.h global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 23/33] block_int-common.h: split function pointers in BlockDriver, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 22/33] block/coroutines: I/O API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 20/33] block: rename bdrv_invalidate_cache_all, blk_invalidate_cache and test_sync_op_invalidate_cache, Emanuele Giuseppe Esposito, 2022/01/21