Whamcloud - gitweb
LU-1199 build: Cleanup ldiskfs kernel config defines
authorJames Simmons <uja.ornl@gmail.com>
Sun, 31 Mar 2013 13:12:34 +0000 (09:12 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 2 Apr 2013 18:08:46 +0000 (14:08 -0400)
Make it more clear what the purpose of the "CONFIG_LDISKFS_*"
defines are with a comment, and separate them from options
that do not necessarily originate in the kernel source. All of
these options are needed for ldiskfs and some are needed by
osd-ldiskfs in the lustre file system. To handle these shared
options a extra autoconf header file is create containing only
the values of interest to osd-ldiskfs.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8e71b6cf471c4317b20fdce14d66f8b2883a226e
Reviewed-on: http://review.whamcloud.com/5675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build-ldiskfs.m4
ldiskfs/config/ldiskfs-build.m4
ldiskfs/configure.ac
ldiskfs/ldiskfs/Makefile.in
ldiskfs/ldiskfs/ldiskfs_config.h.in [new file with mode: 0644]
lustre/lvfs/fsfilt_ext3.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c

index d821f85..cdcd10b 100644 (file)
@@ -105,7 +105,7 @@ if test x$with_ldiskfs = xyes; then
        LB_LDISKFS_RELEASE
        LB_LDISKFS_EXT_DIR
        LB_LDISKFS_BUILD
-       LB_LDISKFS_DEFINE_OPTIONS
+       AC_DEFINE(HAVE_LDISKFS_OSD, 1, Enable ldiskfs osd)
 fi
 
 #
@@ -209,30 +209,6 @@ 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(HAVE_LDISKFS_OSD, 1, Enable ldiskfs osd)
-
-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])
-])
-
-#
 # Optionally configure/make the ldiskfs sources.  If the sources are
 # determined to reside in-tree this feature will automatically be
 # enabled.  If the sources are not in-tree it will be disabled.
index fd0f6d2..0f35f2a 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])
index 1d71f57..cd8bc7c 100644 (file)
@@ -76,7 +76,6 @@ LDISKFS_AC_PATCH_PROGRAM
 if test x$enable_server$enable_dist = xyesno ; then
 LB_LDISKFS_EXT_DIR
 LB_LDISKFS_EXT_SOURCE
-LB_LDISKFS_DEFINE_OPTIONS
 fi
 
 AC_SUBST(ac_configure_args)
index dd8b7ee..6cdc071 100644 (file)
@@ -67,6 +67,7 @@ patches := @top_srcdir@/kernel_patches/patches
 ###############################
 
 EXTRA_CFLAGS += -I@LINUX@/fs -I@LDISKFSDIR@
+EXTRA_CFLAGS += -include @abs_top_builddir@/ldiskfs/ldiskfs_config.h
 EXTRA_CFLAGS += -include @abs_top_builddir@/config.h
 
 obj-m := ldiskfs.o
diff --git a/ldiskfs/ldiskfs/ldiskfs_config.h.in b/ldiskfs/ldiskfs/ldiskfs_config.h.in
new file mode 100644 (file)
index 0000000..a5fab0a
--- /dev/null
@@ -0,0 +1,17 @@
+/* enable posix acls for ldiskfs */
+#define CONFIG_LDISKFSDEV_FS_POSIX_ACL 1
+
+/* enable fs security for ldiskfs */
+#define CONFIG_LDISKFSDEV_FS_SECURITY 1
+
+/* enable extented attributes for ldiskfs */
+#define CONFIG_LDISKFSDEV_FS_XATTR 1
+
+/* enable posix acls for ldiskfs */
+#define CONFIG_LDISKFS_FS_POSIX_ACL 1
+
+/* enable fs security for ldiskfs */
+#define CONFIG_LDISKFS_FS_SECURITY 1
+
+/* - enable extended attributes for ldiskfs */
+#define CONFIG_LDISKFS_FS_XATTR 1
index 4e15094..b7eab7a 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/pagemap.h>
+#include <ldiskfs/ldiskfs_config.h>
 #include <ext4/ext4.h>
 #include <ext4/ext4_jbd2.h>
 #include <linux/version.h>
index 45dec42..75a2a8a 100644 (file)
@@ -52,6 +52,7 @@
 /* struct dirent64 */
 #include <linux/dirent.h>
 
+#include <ldiskfs/ldiskfs_config.h>
 #include <ldiskfs/ldiskfs.h>
 #include <ldiskfs/ldiskfs_jbd2.h>
 
index 61d7da7..80c7d76 100644 (file)
 /* prerequisite for linux/xattr.h */
 #include <linux/fs.h>
 
-/* ext_depth() */
-#include <ldiskfs/ldiskfs.h>
-#include <ldiskfs/ldiskfs_jbd2.h>
-#include <ldiskfs/ldiskfs_extents.h>
-
 /*
  * struct OBD_{ALLOC,FREE}*()
  * OBD_FAIL_CHECK
@@ -62,6 +57,9 @@
 
 #include "osd_internal.h"
 
+/* ext_depth() */
+#include <ldiskfs/ldiskfs_extents.h>
+
 #ifndef HAVE_PAGE_CONSTANT
 #define mapping_cap_page_constant_write(mapping) 0
 #define SetPageConstant(page) do {} while (0)