qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] qemu-ga: avoid blocking on atime update when re


From: Michael Roth
Subject: [Qemu-devel] [PATCH 2/2] qemu-ga: avoid blocking on atime update when reading /etc/mtab
Date: Tue, 29 May 2012 22:25:57 -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 <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
 qga/commands-posix.c |    2 +-
 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");
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]