]> Git Repo - qemu.git/commitdiff
qemu-ga: avoid blocking on atime update when reading /etc/mtab
authorMichael Roth <[email protected]>
Tue, 29 May 2012 15:08:50 +0000 (10:08 -0500)
committerMichael Roth <[email protected]>
Wed, 30 May 2012 02:00:42 +0000 (21:00 -0500)
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 <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
qga/commands-posix.c

index 4a71c27c4a20172f6cd7576d7b803df82ef5b664..00d035da95bf8f95f3aeed7b744432c197545ce2 100644 (file)
@@ -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");
This page took 0.023951 seconds and 4 git commands to generate.