Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-08-16 Thread Emanuele Giuseppe Esposito
Am 27/07/2022 um 17:29 schrieb Vladimir Sementsov-Ogievskiy: > On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: >> iostatus is the only field (together with .job) that needs >> protection using the job mutex. >> >> It is set in the main loop (GLOBAL_STATE functions) but read >> in I/O code (b

Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > iostatus is the only field (together with .job) that needs > protection using the job mutex. > > It is set in the main loop (GLOBAL_STATE functions) but read > in I/O code (block_job_error_action). > > In order to protect it, ch

Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_STATE functions) but read in I/O code (block_job_error_action). Hmm, block_job_error_action doesn't read iostatus..

[PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-07-25 Thread Emanuele Giuseppe Esposito
iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_STATE functions) but read in I/O code (block_job_error_action). In order to protect it, change block_job_iostatus_set_err to block_job_iostatus_set_err_locked(), always ca