Skip to content

Commit

Permalink
virtio: balloon: let host know of updated balloon size before module …
Browse files Browse the repository at this point in the history
…removal

When the balloon module is removed, we deflate the balloon, reclaiming
all the pages that were given to the host.  However, we don't update the
config values for the new balloon size, resulting in the host showing
outdated balloon values.

The size update is done after each leak and fill operation, only the
module removal case was left out.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Amit Shah authored and Michael S. Tsirkin committed May 17, 2012
1 parent fa8b66c commit b8ae0eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev)
/* There might be pages left in the balloon: free them. */
while (vb->num_pages)
leak_balloon(vb, vb->num_pages);
update_balloon_size(vb);

/* Now we reset the device so we can clean up the queues. */
vdev->config->reset(vdev);
Expand Down

0 comments on commit b8ae0eb

Please sign in to comment.