From 68271abc80d7ad788f518f3acf3e4c2b491f6180 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Tue, 15 May 2012 14:46:25 +0800 Subject: [PATCH] LU-709 build: cleanup LC_FLUSH_OWNER_ID/INVALIDATE_MAPPING 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 Change-Id: I3674b032470973ee6b2be5bd05bb7ecc1311d107 Reviewed-on: http://review.whamcloud.com/2322 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 45 ---------------------------------- lustre/include/linux/lustre_compat25.h | 4 --- lustre/llite/file.c | 4 --- 3 files changed, 53 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 0ee0a91..9e88d8c 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 -],[ - 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 diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 28ca758..03d7a23 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -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 diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 06e61d8..4d4d201 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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); -- 1.8.3.1