All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libxl: clean up qemu-save and qemu-resume files
@ 2015-06-03 10:44 Wei Liu
  2015-06-17 11:13 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Liu @ 2015-06-03 10:44 UTC (permalink / raw)
  To: Xen-devel; +Cc: Wei Liu, Ian Jackson, Ian Campbell

These files are leaked when using qemu-trad stubdom.  They are
intermediate files created by libxc. Unfortunately they don't fit well
in our userdata scheme. Clean them up after we destroy all userdata,
we're sure they are not useful anymore at that point.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2: delete those files in parent process
---
 tools/libxl/libxl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 9117b01..d86ea62 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1678,6 +1678,16 @@ static void devices_destroy_cb(libxl__egc *egc,
 
     libxl__unlock_domain_userdata(lock);
 
+    /* Clean up qemu-save and qemu-resume files. They are
+     * intermediate files created by libxc. Unfortunately they
+     * don't fit in existing userdata scheme very well.
+     */
+    rc = libxl__remove_file(gc, libxl__device_model_savefile(gc, domid));
+    if (rc < 0) goto out;
+    rc = libxl__remove_file(gc,
+             GCSPRINTF(XC_DEVICE_MODEL_RESTORE_FILE".%u", domid));
+    if (rc < 0) goto out;
+
     rc = libxl__ev_child_fork(gc, &dis->destroyer, domain_destroy_domid_cb);
     if (rc < 0) goto out;
     if (!rc) { /* child */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] libxl: clean up qemu-save and qemu-resume files
  2015-06-03 10:44 [PATCH v2] libxl: clean up qemu-save and qemu-resume files Wei Liu
@ 2015-06-17 11:13 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-06-17 11:13 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Jackson

On Wed, 2015-06-03 at 11:44 +0100, Wei Liu wrote:
> These files are leaked when using qemu-trad stubdom.  They are
> intermediate files created by libxc. Unfortunately they don't fit well
> in our userdata scheme. Clean them up after we destroy all userdata,
> we're sure they are not useful anymore at that point.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked + applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 10:44 [PATCH v2] libxl: clean up qemu-save and qemu-resume files Wei Liu
2015-06-17 11:13 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.