walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
Blob Blame History Raw
commit b5651e42cedc2b91aba87ea30520884d7f43b36f
Author: Steve Dickson <steved@redhat.com>
Date:   Thu Jan 24 17:02:08 2008 -0500

    Added in relatime mount option so mount.nfs stays
    compatible with the mount command in util-linux-ng
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff -up nfs-utils-1.1.1/utils/mount/mount.c.orig nfs-utils-1.1.1/utils/mount/mount.c
--- nfs-utils-1.1.1/utils/mount/mount.c.orig	2007-10-18 23:07:28.000000000 -0400
+++ nfs-utils-1.1.1/utils/mount/mount.c	2008-01-24 16:46:03.000000000 -0500
@@ -130,6 +130,12 @@ static const struct opt_map opt_map[] = 
   { "diratime", 0, 1, MS_NODIRATIME },  /* Update dir access times */
   { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
 #endif
+#ifdef MS_RELATIME
+  { "relatime", 0, 0, MS_RELATIME },   /* Update access times relative to
+                      mtime/ctime */
+  { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
+                      to mtime/ctime */
+#endif
   { NULL,	0, 0, 0		}
 };
 
diff -up nfs-utils-1.1.1/utils/mount/mount_constants.h.orig nfs-utils-1.1.1/utils/mount/mount_constants.h
--- nfs-utils-1.1.1/utils/mount/mount_constants.h.orig	2007-10-18 23:07:28.000000000 -0400
+++ nfs-utils-1.1.1/utils/mount/mount_constants.h	2008-01-24 16:47:07.000000000 -0500
@@ -39,7 +39,10 @@ if we have a stack or plain mount - moun
 #ifndef MS_VERBOSE
 #define MS_VERBOSE	0x8000	/* 32768 */
 #endif
-
+#ifndef MS_RELATIME
+#define MS_RELATIME 0x200000 /* 200000: Update access times relative
+                                  to mtime/ctime */
+#endif
 /*
  * NFS fs-specific mount option flags
  *