the attached patch makes use of the ST_NOATIME flag I just added in 
glibc for statvfs/fstatvfs, by making libdiskfs expose it if needed in 
its file_statfs implementation. (This will automatically cover ext2fs 
and tmpfs, for example).

OK to push?
Pino Toscano
From d8ea3647ac4367d2ca22c3033802c4062ead6e71 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.p...@tiscali.it>
Date: Fri, 10 May 2013 22:31:41 +0200
Subject: [PATCH] libdiskfs: expose the ST_NOATIME flag

Expose ST_NOATIME as flag (if available in glibc) if diskfs is set in noatime

* libdiskfs/file-statfs.c (diskfs_S_file_statfs): Set ST_NOATIME if
 libdiskfs/file-statfs.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libdiskfs/file-statfs.c b/libdiskfs/file-statfs.c
index 817b011..bbceb3d 100644
--- a/libdiskfs/file-statfs.c
+++ b/libdiskfs/file-statfs.c
@@ -41,6 +41,10 @@ diskfs_S_file_statfs (struct protid *file,
     statbuf->f_flag |= ST_NOEXEC;
   if (diskfs_synchronous)
     statbuf->f_flag |= ST_SYNCHRONOUS;
+#ifdef ST_NOATIME
+  if (_diskfs_noatime)
+    statbuf->f_flag |= ST_NOATIME;
   diskfs_set_statfs (statbuf);

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to