]> git.baikalelectronics.ru Git - kernel.git/commit
um: Use fdatasync() when mapping the UBD FSYNC command
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Wed, 22 Apr 2020 16:00:01 +0000 (17:00 +0100)
committerRichard Weinberger <richard@nod.at>
Tue, 2 Jun 2020 20:37:55 +0000 (22:37 +0200)
commitdd9d10ab74b08d81a5258eee208c748f3fb92e3d
treeceb6f5e538059b73ee13c52afe22fb4b8276cfbe
parentd86d96d964ef775ed62bdebb5de6489f2997787c
um: Use fdatasync() when mapping the UBD FSYNC command

We do not need to update the metadata (atime, mtime, etc)
on the UBD file and/or the COW file until UML exits.

UBD image mtime is checked in UML only when opening
the files. After that they are locked and used
exclusively by a single UML instance, so there is
no point wasting resources on updating metadata on
every sync. We can sync data only. The host will
always update mtime if a file has been modified upon
closing it.

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/file.c