Whamcloud - gitweb
LU-709 build: cleanup LC_FLUSH_OWNER_ID/INVALIDATE_MAPPING
authorPeng Tao <tao.peng@emc.com>
Tue, 15 May 2012 06:46:25 +0000 (14:46 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 26 Jul 2012 04:55:13 +0000 (00:55 -0400)
1. file_opeartions.flush takes fl_owner_t argument since v2.6.18
2. HAVE_INVALIDATE_MAPPING_PAGES and HAVE_INVALIDATE_INODE_PAGES
   are not used in Lustre

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I3674b032470973ee6b2be5bd05bb7ecc1311d107
Reviewed-on: http://review.whamcloud.com/2322
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/llite/file.c

index 0ee0a91..9e88d8c 100644 (file)
@@ -514,47 +514,6 @@ LB_LINUX_TRY_COMPILE([
 EXTRA_KCFLAGS="$tmp_flags"
 ])
 
-# LC_FLUSH_OWNER_ID
-# starting from 2.6.18 the file_operations .flush
-# method has a new "fl_owner_t id" parameter
-#
-AC_DEFUN([LC_FLUSH_OWNER_ID],
-[AC_MSG_CHECKING([if file_operations .flush has an fl_owner_t id])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations *fops = NULL;
-        fl_owner_t id = NULL;
-        int i;
-
-        i = fops->flush(NULL, id);
-],[
-        AC_DEFINE(HAVE_FLUSH_OWNER_ID, 1,
-                [file_operations .flush method has an fl_owner_t id])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_EXPORT_INVALIDATE_MAPPING_PAGES
-#
-# SLES9, RHEL4, RHEL5, vanilla 2.6.24 export invalidate_mapping_pages() but
-# SLES10 2.6.16 does not, for some reason.  For filter cache invalidation.
-#
-AC_DEFUN([LC_EXPORT_INVALIDATE_MAPPING_PAGES],
-    [LB_CHECK_SYMBOL_EXPORT([invalidate_mapping_pages], [mm/truncate.c], [
-         AC_DEFINE(HAVE_INVALIDATE_MAPPING_PAGES, 1,
-                        [exported invalidate_mapping_pages])],
-    [LB_CHECK_SYMBOL_EXPORT([invalidate_inode_pages], [mm/truncate.c], [
-         AC_DEFINE(HAVE_INVALIDATE_INODE_PAGES, 1,
-                        [exported invalidate_inode_pages])], [
-       AC_MSG_ERROR([no way to invalidate pages])
-  ])
-    ],[])
-])
-
 #2.6.18 + RHEL5 (fc6)
 
 # RHEL5 in FS-cache patch rename PG_checked flag into PG_fs_misc
@@ -1881,10 +1840,6 @@ AC_DEFUN([LC_PROG_LINUX],
 
          # 2.6.18
          LC_UMOUNTBEGIN_HAS_VFSMOUNT
-         LC_FLUSH_OWNER_ID
-         if test x$enable_server = xyes ; then
-                LC_EXPORT_INVALIDATE_MAPPING_PAGES
-         fi
 
          #2.6.18 + RHEL5 (fc6)
          LC_PG_FS_MISC
index 28ca758..03d7a23 100644 (file)
@@ -624,10 +624,6 @@ static inline long labs(long x)
 }
 #endif /* HAVE_REGISTER_SHRINKER */
 
-#ifdef HAVE_INVALIDATE_INODE_PAGES
-#define invalidate_mapping_pages(mapping,s,e) invalidate_inode_pages(mapping)
-#endif
-
 #ifndef HAVE_SIMPLE_SETATTR
 #define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops)
 #endif
index 06e61d8..4d4d201 100644 (file)
@@ -1972,11 +1972,7 @@ loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
         RETURN(retval);
 }
 
-#ifdef HAVE_FLUSH_OWNER_ID
 int ll_flush(struct file *file, fl_owner_t id)
-#else
-int ll_flush(struct file *file)
-#endif
 {
         struct inode *inode = file->f_dentry->d_inode;
         struct ll_inode_info *lli = ll_i2info(inode);