tools/xenstore: dump the xenstore state for live update
authorJuergen Gross <jgross@suse.com>
Wed, 13 Jan 2021 13:00:19 +0000 (14:00 +0100)
committerJuergen Gross <jgross@suse.com>
Thu, 21 Jan 2021 16:31:36 +0000 (17:31 +0100)
commited6eebf17d2c8f7d6ac1c2bb23a2c92abf434074
tree94412ca63165c6bac71aaab9e185b8a9df09eaa0
parent3fab4e4f3175c0da4c553d55e79e62fc23d5c1b2
tools/xenstore: dump the xenstore state for live update

Dump the complete Xenstore status to a file (daemon case) or memory
(stubdom case).

As we don't know the exact length of the needed area in advance we are
using an anonymous rather large mapping in stubdom case, which will
use only virtual address space until accessed. And as we are writing
the area in a sequential manner this is fine. As the initial size we
are choosing the double size of the memory allocated via talloc(),
which should be more than enough.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Julien Grall <jgrall@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
tools/xenstore/utils.c
tools/xenstore/utils.h
tools/xenstore/xenstored_control.c
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_core.h
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_domain.h
tools/xenstore/xenstored_watch.c
tools/xenstore/xenstored_watch.h