#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
#
# 2.6.12
LC_RW_TREE_LOCK
- #2.6.18 + RHEL5 (fc6)
- LC_LINUX_FIEMAP_H
-
# raid5-zerocopy patch
LC_PAGE_CONSTANT
#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>
-#endif
struct ll_fiemap_extent {
__u64 fe_logical; /* logical offset in bytes for the start of
#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
* support extents. Result
* merged for efficiency. */
-
#else
#define ll_fiemap_extent fiemap_extent
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)
{
OBD_FREE_LARGE(fiemap, num_bytes);
return rc;
}
-#endif
struct posix_acl * ll_get_acl(struct inode *inode, int type)
{
.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