]> xenbits.xensource.com Git - xen.git/commitdiff
fs-back: unmapp all shared ring pages when a domain dies
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 08:43:53 +0000 (08:43 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Mar 2009 08:43:53 +0000 (08:43 +0000)
This bug causes some pages not to be properly freed by xen, hence
after a cycle of 50 save\restore we don't have enough spare memory to
start 2 VMs any more. This patch fixes the issue properly unmapping
all the pages needed by the shared ring.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/fs-back/fs-backend.c

index 7dc36f269926239962c8f794b1955223d084fe2d..721b2dc0a5d1fd0d6b2f86657c6b2a3a660bc2c6 100644 (file)
@@ -161,7 +161,7 @@ static void terminate_mount_request(struct fs_mount *mount) {
     while (!xenbus_frontend_state_changed(mount, STATE_CLOSING));
     xenbus_write_backend_state(mount, STATE_CLOSED);
 
-    xc_gnttab_munmap(mount->gnth, mount->ring.sring, 1);
+    xc_gnttab_munmap(mount->gnth, mount->ring.sring, mount->shared_ring_size);
     xc_gnttab_close(mount->gnth);
     xc_evtchn_unbind(mount->evth, mount->local_evtchn);
     xc_evtchn_close(mount->evth);