qemu-ga: execute fsfreeze-freeze in reverse order of mounts
commite5d9adbdab972a2172815c1174aed3fabcc448f1
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Tue, 1 Oct 2013 21:09:53 +0000 (1 17:09 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 10 Oct 2013 19:52:37 +0000 (10 14:52 -0500)
tree0ce9e2ae52c168ebcb0829ab1b065415fa51be3a
parentf2c6bcfc2e15e1dc5c69c3e579ff2063068ecb85
qemu-ga: execute fsfreeze-freeze in reverse order of mounts

Currently, fsfreeze-freeze may cause deadlock if a guest has loopback mounts
of image files in its disk; e.g.:

    # mount | grep ^/
    /dev/vda1 / type ext4 (rw,noatime,seclabel,data=ordered)
    /tmp/disk.img on /mnt type ext4 (rw,relatime,seclabel)

To avoid the deadlock, this freezes filesystems in reverse order of mounts.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
*fix up commit msg
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-posix.c