From d6ca0e2a1e483409db1e2f3e8d7c146aa04b7d5a Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 14 May 2009 14:32:13 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=18668 i=adilger, johann Remove AS_TR_CPP marco to avoid autoconf compatibility issue. --- build/autoconf/lustre-build-darwin.m4 | 2 +- build/autoconf/lustre-build-linux.m4 | 20 ++++---------------- build/autoconf/lustre-build.m4 | 13 ------------- lustre/obdfilter/filter.c | 4 ++++ 4 files changed, 9 insertions(+), 30 deletions(-) diff --git a/build/autoconf/lustre-build-darwin.m4 b/build/autoconf/lustre-build-darwin.m4 index a14ebf8..6f1be34 100644 --- a/build/autoconf/lustre-build-darwin.m4 +++ b/build/autoconf/lustre-build-darwin.m4 @@ -13,7 +13,7 @@ do AC_MSG_CHECKING([for $1]) AS_IF([AC_TRY_COMMAND(nm /mach | grep "[$1]" >/dev/null 2>/dev/null)],[ AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2 + AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$ac_func])) $2 ],[ AC_MSG_RESULT([no]) $3 ])dnl diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index 30d4076..c32cc4d 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -109,6 +109,7 @@ LB_LINUX_TRY_COMPILE([ #endif ],[ RHEL_KENEL="yes" + RHEL_KERNEL="yes" AC_MSG_RESULT([yes]) ],[ AC_MSG_RESULT([no]) @@ -192,9 +193,9 @@ LB_CHECK_FILE([$LINUX_CONFIG],[], # at 2.6.19 # $LINUX/include/linux/config.h is removed # and at more old has only one line # include -LB_CHECK_FILES([$LINUX_OBJ/include/linux/autoconf.h - $LINUX_OBJ/include/linux/version.h - ],[], +LB_CHECK_FILE([$LINUX_OBJ/include/linux/autoconf.h],[], + [AC_MSG_ERROR([Run make config in $LINUX.])]) +LB_CHECK_FILE([$LINUX_OBJ/include/linux/version.h],[], [AC_MSG_ERROR([Run make config in $LINUX.])]) # ------------ rhconfig.h includes runtime-generated bits -- @@ -622,16 +623,3 @@ AC_CACHE_CHECK([for $1], ac_Header, AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Header])dnl ]) - -# -# Like AC_CHECK_HEADERS but for kernel space headers -# -AC_DEFUN([LB_CHECK_LINUX_HEADERS], -[AH_CHECK_HEADERS([$1])dnl -for ac_header in $1 -do -LB_CHECK_LINUX_HEADER($ac_header, - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_header)) $2], - [$3])dnl -done -]) diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 343748d..e8f941d 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -45,19 +45,6 @@ AS_IF([test AS_VAR_GET(lb_File) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([lb_File])dnl ])# LB_CHECK_FILE -# -# LB_CHECK_FILES -# -# LB_CHECK_FILE over multiple files -# -AC_DEFUN([LB_CHECK_FILES], -[AC_FOREACH([AC_FILE_NAME], [$1], - [LB_CHECK_FILE(AC_FILE_NAME, - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1, - [Define to 1 if you have the - file `]AC_File['.]) -$2], - [$3])])]) # # LB_ARG_LIBS_INCLUDES diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index ac22f63..7f3c679 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1851,7 +1851,9 @@ int filter_common_setup(struct obd_device *obd, obd_count len, void *buf, __u8 *uuid_ptr; char *str, *label; char ns_name[48]; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) struct request_queue *q; +#endif int rc; ENTRY; @@ -1964,6 +1966,7 @@ int filter_common_setup(struct obd_device *obd, obd_count len, void *buf, if (rc) GOTO(err_post, rc); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) q = bdev_get_queue(mnt->mnt_sb->s_bdev); if (q->max_sectors < q->max_hw_sectors && q->max_sectors < PTLRPC_MAX_BRW_SIZE >> 9) @@ -1972,6 +1975,7 @@ int filter_common_setup(struct obd_device *obd, obd_count len, void *buf, "could be up to max_hw_sectors=%u\n", obd->obd_name, mnt->mnt_sb->s_id, q->max_sectors, q->max_hw_sectors); +#endif uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb); if (uuid_ptr != NULL) { -- 1.8.3.1