From 7feb45121343af25a320088e07df3bf687011225 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Fri, 2 Aug 2013 08:26:58 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_LINUX_FIEMAP_H test has been upstream since v2.6.28 We can remove the test and the dead code. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: I26fbef49fa672e81bd23697c972d6f3fff0944b4 Reviewed-on: http://review.whamcloud.com/5342 Tested-by: Hudson Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 25 ------------------------- lustre/include/lustre/ll_fiemap.h | 5 +---- lustre/llite/file.c | 4 ---- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 3dc9cff..7737e0e 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -354,28 +354,6 @@ EXTRA_KCFLAGS="$tmp_flags" #2.6.18 + RHEL5 (fc6) -# -# LC_LINUX_FIEMAP_H -# -# fiemap.h is added since v2.6.28 -# RHEL5 2.6.18 has it, while SLES10 2.6.27 does not -# -AC_DEFUN([LC_LINUX_FIEMAP_H], -[LB_CHECK_FILE([$LINUX/include/linux/fiemap.h],[ - AC_MSG_CHECKING([if fiemap.h can be compiled]) - LB_LINUX_TRY_COMPILE([ - #include - #include - ],[],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_LINUX_FIEMAP_H, 1, [Kernel has fiemap.h]) - ],[ - AC_MSG_RESULT([no]) - ]) -], -[]) -]) - # raid5-zerocopy patch # @@ -1484,9 +1462,6 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.12 LC_RW_TREE_LOCK - #2.6.18 + RHEL5 (fc6) - LC_LINUX_FIEMAP_H - # raid5-zerocopy patch LC_PAGE_CONSTANT diff --git a/lustre/include/lustre/ll_fiemap.h b/lustre/include/lustre/ll_fiemap.h index 6e63c3e..1753f14 100644 --- a/lustre/include/lustre/ll_fiemap.h +++ b/lustre/include/lustre/ll_fiemap.h @@ -43,12 +43,10 @@ #ifndef _LUSTRE_FIEMAP_H #define _LUSTRE_FIEMAP_H -#if !defined(HAVE_LINUX_FIEMAP_H) || !defined(__KERNEL__) +#if !defined(__KERNEL__) -#ifndef __KERNEL__ #include #include -#endif struct ll_fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of @@ -98,7 +96,6 @@ struct ll_user_fiemap { #define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively * support extents. Result * merged for efficiency. */ - #else #define ll_fiemap_extent fiemap_extent diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 6e80b35..6d94033 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3199,7 +3199,6 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat) return ll_getattr_it(mnt, de, &it, stat); } -#ifdef HAVE_LINUX_FIEMAP_H int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, __u64 start, __u64 len) { @@ -3232,7 +3231,6 @@ int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, OBD_FREE_LARGE(fiemap, num_bytes); return rc; } -#endif struct posix_acl * ll_get_acl(struct inode *inode, int type) { @@ -3384,9 +3382,7 @@ struct inode_operations ll_file_inode_operations = { .getxattr = ll_getxattr, .listxattr = ll_listxattr, .removexattr = ll_removexattr, -#ifdef HAVE_LINUX_FIEMAP_H .fiemap = ll_fiemap, -#endif #ifdef HAVE_IOP_GET_ACL .get_acl = ll_get_acl, #endif -- 1.8.3.1