|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState |
Date: | Tue, 22 Jun 2021 12:20:03 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 22/06/21 11:36, Vladimir Sementsov-Ogievskiy wrote:
It does. If it returns true, you still want the load of finished to happen before the reads that follow.Hmm.. The worst case if we use just qatomic_read is that assertion will not crash when it actually should. That doesn't break the logic. But that's not good anyway.OK, I agree, let's keep it.
You can also have a finished job, but get a stale value for error_is_read or ret. The issue is not in getting the stale value per se, but in block_copy_call_status's caller not expecting it.
(I understand you agree, but I guess it can be interesting to learn about this too).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |