On 08/07/2021 13:02, Stefan Hajnoczi wrote:
On Wed, Jul 07, 2021 at 06:58:11PM +0200, Emanuele Giuseppe Esposito wrote:
-    /** AioContext to run the job coroutine in */
+    /**
+     * AioContext to run the job coroutine in.
+     * Atomic.
+     */
      AioContext *aio_context;

This isn't accessed using atomic operations, so I'm not sure why it's
documented as atomic?

Maybe this is unnecessary, but from what I understand right now when we want to change the AioContext of a child node, we need to acquire its AioContext lock, and then we try to set it. Without AioContext locks, my understanding is that this has to be protected somehow. Therefore I thought of setting this pointer atomically (actual code that does this is in patch 5).

Again same reasoning style applies here: this patch just adds a bounce of comments, but merging it with next one would just make it more unreadable.

Emanuele


Reply via email to