]> xenbits.xensource.com Git - xen.git/commit
libxl: In domain death search, start search at first domid we want
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 17 Mar 2015 15:30:57 +0000 (09:30 -0600)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 12 Aug 2015 10:59:25 +0000 (11:59 +0100)
commit56be637e71e5fe22bebb8045762a1fab3da8a184
tree039b9473786711bbe541377e58f57901b41a9e2f
parent4063b8566794d849e0c0a3d7b62ad7989dcc2b58
libxl: In domain death search, start search at first domid we want

From: Ian Jackson <Ian.Jackson@eu.citrix.com>

When domain_death_xswatch_callback needed a further call to
xc_domain_getinfolist it would restart it with the last domain it
found rather than the first one it wants.

If it only wants one it will also only ask for one domain.  The result
would then be that it gets the previous domain again (ie, the previous
one to the one it wants), which still doesn't reveal the answer to the
question, and it would therefore loop again.

It's completely unclear to me why I thought it was a good idea to
start the xc_domain_getinfolist with the last domain previously found
rather than the first one left un-confirmed.  The code has been that
way since it was introduced.

Instead, start each xc_domain_getinfolist at the next domain whose
status we need to check.

We also need to move the test for !evg into the loop, we now need evg
to compute the arguments to getinfolist.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reported-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Tested-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 4783c99aab866f470bd59368cfbf5ad5f677b0ec)
(cherry picked from commit 0b19348f3cd176e4badb173dd0054c49346a6ce1)
(cherry picked from commit 13623d5d8e854f20b2da885f4d452dc870912205)
(cherry picked from commit 0332b3f24b2c1be06a17b00786021aeea01c52f5)
tools/libxl/libxl.c