# this should be set to future
TEST_39_ATIME=`date -d "1 year" +%s`
-is_sles11() # LU-1783
-{
- if [ -r /etc/SuSE-release ]
- then
- local vers=`grep VERSION /etc/SuSE-release | awk '{print $3}'`
- local patchlev=`grep PATCHLEVEL /etc/SuSE-release \
- | awk '{print $3}'`
- if [ $vers -eq 11 ] && [ $patchlev -eq 1 ]
- then
- return 0
- fi
- fi
- return 1
-}
-
test_39l() {
- is_sles11 && skip "SLES 11 SP1" && return # LU-1783
remote_mds_nodsh && skip "remote MDS with nodsh" && return
local atime_diff=$(do_facet $SINGLEMDS lctl get_param -n mdd.*.atime_diff)
#include <limits.h>
#include <ctype.h>
-#ifdef __linux__
-/* libcfs.h is not really needed here, but on SLES10/PPC, fs.h includes idr.h
- * which requires BITS_PER_LONG to be defined */
-#include <libcfs/libcfs.h>
-#ifndef BLKGETSIZE64
-#include <linux/fs.h> /* for BLKGETSIZE64 */
-#endif
-#include <linux/version.h>
-#endif
#include <lustre_disk.h>
#include <lustre_param.h>
#include <lnet/lnetctl.h>
#include <lustre_ver.h>
#include <ctype.h>
#include <limits.h>
+#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 10, 51, 0)
+/*
+ * LU-1783
+ * We only #include a kernel level include file here because
+ * important MS_ flag #defines are missing from the SLES version
+ * of sys/mount.h
+ * In the future if SLES updates sys/mount.h to have a more complete
+ * set of flag #defines we should stop including linux/fs.h
+ */
+#warn remove kernel include
+#else
+#include <linux/fs.h>
+#endif
#define MAXOPT 4096
#define MAX_RETRIES 99
}
}
#ifdef MS_STRICTATIME
- /* set strictatime to default if NOATIME or RELATIME
- not given explicit */
- if (!(*flagp & (MS_NOATIME | MS_RELATIME)))
- *flagp |= MS_STRICTATIME;
+#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 10, 51, 0)
+/*
+ * LU-1783
+ * In the future when upstream fixes land in all supported kernels
+ * we should stop forcing MS_STRICTATIME in lustre mounts.
+ * We override the kernel level default of MS_RELATIME for now
+ * due to a kernel vfs level bug in atime updates that fails
+ * to reset timestamps from the future.
+ */
+#warn remove MS_STRICTATIME override
+#endif
+ /* set strictatime to default if NOATIME or RELATIME
+ not given explicit */
+ if (!(*flagp & (MS_NOATIME | MS_RELATIME)))
+ *flagp |= MS_STRICTATIME;
#endif
strcpy(orig_options, options);
free(options);