|
From: | Emanuele Giuseppe Esposito |
Subject: | Re: [RFC PATCH v2 14/14] job.c: enable job lock/unlock and remove Aiocontext locks |
Date: | Thu, 23 Dec 2021 15:59:50 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 18/12/2021 13:24, Vladimir Sementsov-Ogievskiy wrote:
04.11.2021 17:53, Emanuele Giuseppe Esposito wrote:--- a/block/replication.c +++ b/block/replication.c@@ -728,9 +728,11 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp)* disk, secondary disk in backup_job_completed(). */ if (s->backup_job) { + aio_context_release(aio_context); job_lock(); job_cancel_sync(&s->backup_job->job, true); job_unlock(); + aio_context_acquire(aio_context);Why we need it? If we never acquire aio context under job_lock, it should be safe to make a job-mutex critical section inside aio-context critical section.
Right, it works also with the aio context taken. I will remove this hunk. Thank you, Emanuele
[Prev in Thread] | Current Thread | [Next in Thread] |