From: James Simmons Date: Sun, 31 Mar 2013 13:12:34 +0000 (-0400) Subject: LU-1199 build: Cleanup ldiskfs kernel config defines X-Git-Tag: 2.3.64~46 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1ec95b2b5410286c46b95c624e1d382b1e86535a;hp=ef3da124b5d4d170819b4253525e5e93ecb2e85b LU-1199 build: Cleanup ldiskfs kernel config defines 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 Change-Id: I8e71b6cf471c4317b20fdce14d66f8b2883a226e Reviewed-on: http://review.whamcloud.com/5675 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- diff --git a/config/lustre-build-ldiskfs.m4 b/config/lustre-build-ldiskfs.m4 index d821f85..cdcd10b 100644 --- a/config/lustre-build-ldiskfs.m4 +++ b/config/lustre-build-ldiskfs.m4 @@ -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. diff --git a/ldiskfs/config/ldiskfs-build.m4 b/ldiskfs/config/ldiskfs-build.m4 index fd0f6d2..0f35f2a 100644 --- a/ldiskfs/config/ldiskfs-build.m4 +++ b/ldiskfs/config/ldiskfs-build.m4 @@ -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- 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]) diff --git a/ldiskfs/configure.ac b/ldiskfs/configure.ac index 1d71f57..cd8bc7c 100644 --- a/ldiskfs/configure.ac +++ b/ldiskfs/configure.ac @@ -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) diff --git a/ldiskfs/ldiskfs/Makefile.in b/ldiskfs/ldiskfs/Makefile.in index dd8b7ee..6cdc071 100644 --- a/ldiskfs/ldiskfs/Makefile.in +++ b/ldiskfs/ldiskfs/Makefile.in @@ -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 index 0000000..a5fab0a --- /dev/null +++ b/ldiskfs/ldiskfs/ldiskfs_config.h.in @@ -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 diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 4e15094..b7eab7a 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/lustre/osd-ldiskfs/osd_internal.h b/lustre/osd-ldiskfs/osd_internal.h index 45dec42..75a2a8a 100644 --- a/lustre/osd-ldiskfs/osd_internal.h +++ b/lustre/osd-ldiskfs/osd_internal.h @@ -52,6 +52,7 @@ /* struct dirent64 */ #include +#include #include #include diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index 61d7da7..80c7d76 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -49,11 +49,6 @@ /* prerequisite for linux/xattr.h */ #include -/* ext_depth() */ -#include -#include -#include - /* * struct OBD_{ALLOC,FREE}*() * OBD_FAIL_CHECK @@ -62,6 +57,9 @@ #include "osd_internal.h" +/* ext_depth() */ +#include + #ifndef HAVE_PAGE_CONSTANT #define mapping_cap_page_constant_write(mapping) 0 #define SetPageConstant(page) do {} while (0)