[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held |
Date: |
Tue, 28 Jun 2022 19:28:41 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
Am 28/06/2022 um 17:26 schrieb Vladimir Sementsov-Ogievskiy:
> On 6/28/22 18:22, Vladimir Sementsov-Ogievskiy wrote:
>> On 6/28/22 16:04, Emanuele Giuseppe Esposito wrote:
>>>>> Ok so far I did the following:
>>>>>
>>>>> - duplicated each public function as static {function}_locked()
>>>> They shouldn't be duplicates: function without _locked suffix should
>>>> take the mutex.
>>> By "duplicate" I mean same function name, with just _locked suffix.
>>> Maybe a better definition?
>>>
>>> Almost done preparing the patches!
>>
>> Why not just add _locked version and rework the version without suffix
>> to call _locked under mutex one in one patch, to just keep it all
>> meaningful?
>>
>
> I mean, instead of:
>
> patch 1: add a _locked() duplicate
>
> At this point we have a duplicated function that's just bad practice.
>
> patch 2: remake version without prefix to call _locked() under mutex
>
> Now everything is correct. But we have to track the moment when
> something strange becomes something correct.
>
>
> do just
>
> patch 1: rename function to _locked() and add a wrapper without suffix,
> that calls _locked() under mutex
>
>
That's what I always intended to do. As I said, I just used the wrong word.
Emanuele
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, (continued)
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/06/23
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Vladimir Sementsov-Ogievskiy, 2022/06/23
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Kevin Wolf, 2022/06/24
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Paolo Bonzini, 2022/06/24
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/06/24
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/06/28
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Vladimir Sementsov-Ogievskiy, 2022/06/28
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/06/28
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Vladimir Sementsov-Ogievskiy, 2022/06/28
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Vladimir Sementsov-Ogievskiy, 2022/06/28
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held,
Emanuele Giuseppe Esposito <=
- Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held, Vladimir Sementsov-Ogievskiy, 2022/06/28
[PATCH v7 18/18] block_job_query: remove atomic read, Emanuele Giuseppe Esposito, 2022/06/16
[PATCH v7 13/18] job.h: define unlocked functions, Emanuele Giuseppe Esposito, 2022/06/16
[PATCH v7 04/18] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, Emanuele Giuseppe Esposito, 2022/06/16
[PATCH v7 17/18] job.c: enable job lock/unlock and remove Aiocontext locks, Emanuele Giuseppe Esposito, 2022/06/16
[PATCH v7 14/18] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext, Emanuele Giuseppe Esposito, 2022/06/16
[PATCH v7 06/18] jobs: protect jobs with job_lock/unlock, Emanuele Giuseppe Esposito, 2022/06/16