aboutsummaryrefslogtreecommitdiff
path: root/qga
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2012-05-29 10:08:50 -0500
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-05-29 21:00:42 -0500
commit9e2fa418fbe71dd472fe5a9cd89ca26d5b594920 (patch)
tree471cfdc9d31482b3388132d8d769b4475ccd227e /qga
parenteecae14724b64d43f9a44b9b4e69143961c201a3 (diff)
downloadqemu-9e2fa418fbe71dd472fe5a9cd89ca26d5b594920.zip
qemu-9e2fa418fbe71dd472fe5a9cd89ca26d5b594920.tar.gz
qemu-9e2fa418fbe71dd472fe5a9cd89ca26d5b594920.tar.bz2
qemu-ga: avoid blocking on atime update when reading /etc/mtab
Currently we re-read/re-process /etc/mtab to get an updated list of mounts when guest-fsfreeze-thaw is called. This can cause an atime update on /etc/mtab, which will block if we're in a frozen state. Instead, use /proc's version of mtab, which may not be up-to-date with options passed via -o remount, but is compatible for our use cases since we only care about the filesystem type. Reported-by: Matsuda, Daiki <matsudadik@intellilink.co.jp> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga')
-rw-r--r--qga/commands-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 4a71c27..00d035d 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -345,7 +345,7 @@ static int guest_fsfreeze_build_mount_list(GuestFsfreezeMountList *mounts)
{
struct mntent *ment;
GuestFsfreezeMount *mount;
- char const *mtab = MOUNTED;
+ char const *mtab = "/proc/self/mounts";
FILE *fp;
fp = setmntent(mtab, "r");