core: Use O_NOATIME to open metadata

We really don't need atime for metadata, it's just a speed hit.
This commit is contained in:
Colin Walters committed 2012-08-27 16:07:39 -04:00
1 parent 2396608754
commit 4d2f770748
4 files changed
+40 -7

No files matched your search

+2 -6
View File
@@ -812,12 +812,8 @@ ensure_file_data_synced (GFile *file,
gboolean ret = FALSE;
int fd = -1;
fd = g_open (ot_gfile_get_path_cached (file), O_RDONLY | O_NOATIME | O_CLOEXEC | O_LARGEFILE, 0);
if (fd < 0)
{
ot_util_set_error_from_errno (error, errno);
goto out;
}
if (!ot_unix_open_noatime (ot_gfile_get_path_cached (file), &fd, error))
goto out;
if (!ot_unix_fdatasync (fd, error))
goto out;