[XENBUS] Introduce new "online" node for backend drivers.

Driver changes:  Make backend drivers check it when entering Closed
state, only unregister devices when the "online" node is either "0" or
not present.  The later maintains backward compatibility.

Tools changes:  Update "online" node when creating and hot-unplugging
devices.

Background: When kexec'ing a new kernel, the old kernel's frontend
driver will shutdown, but the backend device should *NOT* disappear
due to that, so the new kernel instance can reconnect.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-09-01 00:33:19 +01:00
1 parent e957a7cb4a
commit 5182367c40
8 files changed
+62 -17

No files matched your search

@@ -207,6 +207,9 @@ class DevController:
devid = int(devid)
# Modify online status /before/ updating state (latter is watched by
# drivers, so this ordering avoids a race).
self.writeBackend(devid, 'online', "0")
self.writeBackend(devid, 'state', str(xenbusState['Closing']))
@@ -406,7 +409,8 @@ class DevController:
'domain' : self.vm.getName(),
'frontend' : frontpath,
'frontend-id' : "%i" % self.vm.getDomid(),
'state' : str(xenbusState['Initialising'])
'state' : str(xenbusState['Initialising']),
'online' : "1"
})
return (backpath, frontpath)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.