From 9e2fa418fbe71dd472fe5a9cd89ca26d5b594920 Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Tue, 29 May 2012 10:08:50 -0500 Subject: 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 Signed-off-by: Michael Roth --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 4a71c27c4a..00d035da95 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"); -- cgit v1.2.3