diff options
Diffstat (limited to 'sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch')
-rw-r--r-- | sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch b/sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch new file mode 100644 index 000000000..9e4311797 --- /dev/null +++ b/sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch @@ -0,0 +1,89 @@ +From 9e6789a41f3b1afd1a8a2575a4abbc49f0b10727 Mon Sep 17 00:00:00 2001 +From: Liu Xuezhao <xuezhao.liu@emc.com> +Date: Thu, 9 Aug 2012 10:34:49 +0800 +Subject: [PATCH 09/13] LU-1337 vfs: kernel 3.4 touch_atime switchs to 1 + argument + +touch_atime switchs to use 1 argument of struct path since +kernel 3.4 (commit 68ac1234fb949b66941d94dce4157742799fc581). + +Add LC_TOUCH_ATIME_1ARG/HAVE_TOUCH_ATIME_1ARG to check it. + +Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> +Change-Id: I1a0478459538376761b96e1dc65328eeeef60d0f +--- + lustre/autoconf/lustre-core.m4 | 22 ++++++++++++++++++++++ + lustre/llite/dir.c | 9 +++++++++ + 2 files changed, 31 insertions(+) + +diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 +index 15f58ab..3b3115c 100644 +--- a/lustre/autoconf/lustre-core.m4 ++++ b/lustre/autoconf/lustre-core.m4 +@@ -2009,6 +2009,25 @@ EXTRA_KCFLAGS="$tmp_flags" + ]) + + # ++# 3.4 switchs touch_atime to struct path ++# see kernel commit 68ac1234fb949b66941d94dce4157742799fc581 ++# ++AC_DEFUN([LC_TOUCH_ATIME_1ARG], ++[AC_MSG_CHECKING([if touch_atime use one argument]) ++LB_LINUX_TRY_COMPILE([ ++ #include <linux/fs.h> ++],[ ++ touch_atime((struct path *)NULL); ++],[ ++ AC_DEFINE(HAVE_TOUCH_ATIME_1ARG, 1, ++ [touch_atime use one argument]) ++ AC_MSG_RESULT([yes]) ++],[ ++ AC_MSG_RESULT([no]) ++]) ++]) ++ ++# + # LC_PROG_LINUX + # + # Lustre linux kernel checks +@@ -2168,6 +2187,9 @@ AC_DEFUN([LC_PROG_LINUX], + LC_SUPEROPS_USE_DENTRY + LC_INODEOPS_USE_UMODE_T + ++ # 3.4 ++ LC_TOUCH_ATIME_1ARG ++ + # + if test x$enable_server = xyes ; then + AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) +diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c +index f985625..f418631 100644 +--- a/lustre/llite/dir.c ++++ b/lustre/llite/dir.c +@@ -500,6 +500,9 @@ int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) + int hash64 = sbi->ll_flags & LL_SBI_64BIT_HASH; + struct page *page; + struct ll_dir_chain chain; ++#ifdef HAVE_TOUCH_ATIME_1ARG ++ struct path path; ++#endif + int done; + int rc; + ENTRY; +@@ -627,7 +630,13 @@ int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) + filp->f_pos = pos; + } + filp->f_version = inode->i_version; ++#ifdef HAVE_TOUCH_ATIME_1ARG ++ path.mnt = filp->f_vfsmnt; ++ path.dentry = filp->f_dentry; ++ touch_atime(&path); ++#else + touch_atime(filp->f_vfsmnt, filp->f_dentry); ++#endif + + ll_dir_chain_fini(&chain); + +-- +1.7.12 + |