Whamcloud - gitweb
LU-1812 fsfilt: ext4_free_blocks() has changed slightly
[fs/lustre-release.git] / ldiskfs / config / ldiskfs-build.m4
index fd0f6d2..d87e9f8 100644 (file)
@@ -495,7 +495,7 @@ AS_VAR_POPDEF([lb_File])dnl
 # add -include config.h
 #
 AC_DEFUN([LB_CONFIG_HEADERS],[
-       AC_CONFIG_HEADERS([config.h])
+       AC_CONFIG_HEADERS([config.h ldiskfs/ldiskfs_config.h])
        CPPFLAGS="-include $PWD/config.h $CPPFLAGS"
        EXTRA_KCFLAGS="-include $PWD/config.h $EXTRA_KCFLAGS"
        AC_SUBST(EXTRA_KCFLAGS)
@@ -608,28 +608,6 @@ and kernel-debuginfo-common-<arch> packages are installed.
 fi
 ])
 
-#
-# LB_LDISKFS_DEFINE_OPTIONS
-#
-# Enable config options related to ldiskfs.  These are used by ldiskfs,
-# lvfs, and the osd-ldiskfs code (which includes ldiskfs headers.)
-#
-AC_DEFUN([LB_LDISKFS_DEFINE_OPTIONS],
-[
-AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1,
-       [enable extended attributes for ldiskfs])
-AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1,
-       [enable posix acls for ldiskfs])
-AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1,
-       [enable fs security for ldiskfs])
-AC_DEFINE(CONFIG_LDISKFSDEV_FS_POSIX_ACL, 1,
-       [enable posix acls for ldiskfs])
-AC_DEFINE(CONFIG_LDISKFSDEV_FS_XATTR, 1,
-       [enable extented attributes for ldiskfs])
-AC_DEFINE(CONFIG_LDISKFSDEV_FS_SECURITY, 1,
-       [enable fs security for ldiskfs])
-])
-
 AC_DEFUN([LB_LDISKFS_SYMVERS],
 [
 AC_MSG_CHECKING([ldiskfs module symbols])
@@ -728,6 +706,24 @@ fi
 AC_SUBST(LDISKFS_SERIES)
 ])
 
+#
+# 2.6.32-rc7 ext4_free_blocks requires struct buffer_head
+#
+AC_DEFUN([LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD],
+[AC_MSG_CHECKING([if ext4_free_blocks needs struct buffer_head])
+ LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+       #include "$EXT_DIR/ext4.h"
+],[
+       ext4_free_blocks(NULL, NULL, NULL, 0, 0, 0);
+],[
+       AC_MSG_RESULT([yes])
+       AC_DEFINE(HAVE_EXT_FREE_BLOCK_WITH_BUFFER_HEAD, 1,
+                 [ext4_free_blocks do not require struct buffer_head])
+],[
+       AC_MSG_RESULT([no])
+])
+])
 
 #
 # LDISKFS_AC_PATCH_PROGRAM