mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
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>
This commit is contained in:
parent
eecae14724
commit
9e2fa418fb
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user