On 12.03.25 18:40, Jason Andryuk wrote:
On 2025-02-04 06:34, Juergen Gross wrote:Use the new unique_id of a domain in order to detect that a domain has been replaced with another one reusing the doamin-id of the olds/doamin/domain/domain. Signed-off-by: Juergen Gross <[email protected]> ---diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c index a6506a5bb2..63df24030e 100644 --- a/tools/xenstored/domain.c +++ b/tools/xenstored/domain.c@@ -627,9 +628,17 @@ static int check_domain(const void *k, void *v, void *arg) int dom_invalid; struct domain *domain = v; bool *notify = arg; + uint64_t unique_id; dom_invalid = xenmanage_get_domain_info(xm_handle, domain->domid, - &state, NULL); + &state, &unique_id); + if (!dom_invalid) {What do you think about `if (dom_valid)` to avoid the double negative?
Yes, probably better.
If you don't want to change it, the code here and elsewhere looks fine to me as-is. You'll re-spin with updated dump code, correct?
Yes. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
