|
From: | Emanuele Giuseppe Esposito |
Subject: | Re: [PATCH v4 3/6] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions |
Date: | Mon, 21 Jun 2021 10:13:54 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 19/06/2021 20:31, Vladimir Sementsov-Ogievskiy wrote:
Ok I got confused in the last patch. Method is read by block_copy_task_entry only after it is re-set in block_copy_dirty_clusters loop. Sorry for that.19.06.2021 18:23, Vladimir Sementsov-Ogievskiy wrote:typedef struct BlockCopyTask { AioTask task; + /* + * IN parameters. Initialized in block_copy_task_create() + * and never changed. + */That's just not true for method field :(I think, we just need to document that @method is never accessed concurrently
Will leave it as IN and document it better.Still, moving the lock granularity inside the while loop might not be too bad. Not sure though. At this point skip_unallocated can also be an atomic, even though I sense that you won't like that :)
Emanuele
[Prev in Thread] | Current Thread | [Next in Thread] |