Skip to content

Commit

Permalink
qemu-ga: avoid blocking on atime update when reading /etc/mtab
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mdroth committed May 30, 2012
1 parent eecae14 commit 9e2fa41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qga/commands-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 9e2fa41

Please sign in to comment.