Whamcloud - gitweb
LU-2800 autoconf: remove LC_LINUX_FIEMAP_H test 42/5342/7
authorJames Simmons <uja.ornl@gmail.com>
Fri, 2 Aug 2013 12:26:58 +0000 (08:26 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Aug 2013 06:55:17 +0000 (06:55 +0000)
<linux/fiemap.h> has been upstream since v2.6.28
We can remove the test and the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I26fbef49fa672e81bd23697c972d6f3fff0944b4
Reviewed-on: http://review.whamcloud.com/5342
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/include/lustre/ll_fiemap.h
lustre/llite/file.c

index 3dc9cff..7737e0e 100644 (file)
@@ -354,28 +354,6 @@ EXTRA_KCFLAGS="$tmp_flags"
 
 #2.6.18 + RHEL5 (fc6)
 
 
 #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 <linux/types.h>
-                #include <linux/fiemap.h>
-        ],[],[
-                AC_MSG_RESULT([yes])
-                AC_DEFINE(HAVE_LINUX_FIEMAP_H, 1, [Kernel has fiemap.h])
-        ],[
-                AC_MSG_RESULT([no])
-        ])
-],
-[])
-])
-
 # raid5-zerocopy patch
 
 #
 # raid5-zerocopy patch
 
 #
@@ -1484,9 +1462,6 @@ AC_DEFUN([LC_PROG_LINUX],
          # 2.6.12
          LC_RW_TREE_LOCK
 
          # 2.6.12
          LC_RW_TREE_LOCK
 
-         #2.6.18 + RHEL5 (fc6)
-         LC_LINUX_FIEMAP_H
-
          # raid5-zerocopy patch
          LC_PAGE_CONSTANT
 
          # raid5-zerocopy patch
          LC_PAGE_CONSTANT
 
index 6e63c3e..1753f14 100644 (file)
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
-#if !defined(HAVE_LINUX_FIEMAP_H) || !defined(__KERNEL__)
+#if !defined(__KERNEL__)
 
 
-#ifndef __KERNEL__
 #include <stddef.h>
 #include <libcfs/posix/posix-types.h>
 #include <stddef.h>
 #include <libcfs/posix/posix-types.h>
-#endif
 
 struct ll_fiemap_extent {
         __u64 fe_logical;  /* logical offset in bytes for the start of
 
 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. */
 #define FIEMAP_EXTENT_MERGED            0x00001000 /* File does not natively
                                                     * support extents. Result
                                                     * merged for efficiency. */
-
 #else
 
 #define ll_fiemap_extent fiemap_extent
 #else
 
 #define ll_fiemap_extent fiemap_extent
index 6e80b35..6d94033 100644 (file)
@@ -3199,7 +3199,6 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
         return ll_getattr_it(mnt, de, &it, 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)
 {
 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;
 }
         OBD_FREE_LARGE(fiemap, num_bytes);
         return rc;
 }
-#endif
 
 struct posix_acl * ll_get_acl(struct inode *inode, int type)
 {
 
 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,
        .getxattr       = ll_getxattr,
        .listxattr      = ll_listxattr,
        .removexattr    = ll_removexattr,
-#ifdef  HAVE_LINUX_FIEMAP_H
        .fiemap         = ll_fiemap,
        .fiemap         = ll_fiemap,
-#endif
 #ifdef HAVE_IOP_GET_ACL
        .get_acl        = ll_get_acl,
 #endif
 #ifdef HAVE_IOP_GET_ACL
        .get_acl        = ll_get_acl,
 #endif