AC_DEFUN([LB_LDISKFS_EXT_SOURCE],
[
if test x$EXT_DIR = x; then
- AC_MSG_ERROR([Complete $LDISKFS_BACKFS source must exist.
-
-If you are building using kernel-devel packages then ensure that the
-matching kernel-debuginfo-common and kernel-debuginfo-common-<arch>
-packages are installed.])
+ enable_ldiskfs_build='no'
+else
+ LB_CHECK_FILE([$EXT_DIR/dir.c], [], [
+ enable_ldiskfs_build='no'
+ AC_MSG_WARN([$LDISKFS_BACKFS must exist for ldiskfs build])])
+ LB_CHECK_FILE([$EXT_DIR/file.c], [], [
+ enable_ldiskfs_build='no'
+ AC_MSG_WARN([$LDISKFS_BACKFS must exist for ldiskfs build])])
+ LB_CHECK_FILE([$EXT_DIR/inode.c], [], [
+ enable_ldiskfs_build='no'
+ AC_MSG_WARN([$LDISKFS_BACKFS must exist for ldiskfs build])])
+ LB_CHECK_FILE([$EXT_DIR/super.c], [], [
+ enable_ldiskfs_build='no'
+ AC_MSG_WARN([$LDISKFS_BACKFS must exist for ldiskfs build])])
fi
-LB_CHECK_FILE([$EXT_DIR/dir.c], [], [ AC_MSG_ERROR(
- [Complete $LDISKFS_BACKFS source must exist for ldiskfs build])])
-LB_CHECK_FILE([$EXT_DIR/file.c], [], [ AC_MSG_ERROR(
- [Complete $LDISKFS_BACKFS source must exist for ldiskfs build])])
-LB_CHECK_FILE([$EXT_DIR/inode.c], [], [ AC_MSG_ERROR(
- [Complete $LDISKFS_BACKFS source must exist for ldiskfs build])])
-LB_CHECK_FILE([$EXT_DIR/super.c], [], [ AC_MSG_ERROR(
- [Complete $LDISKFS_BACKFS source must exist for ldiskfs build])])
+if test x$enable_ldiskfs_build = xno; then
+ enable_server='no'
+ enable_ldiskfs_build='no'
+ with_ldiskfs='no'
+ LDISKFS_SUBDIR=
+
+ AC_MSG_WARN([
+
+Disabling server because complete $LDISKFS_BACKFS source does not exist.
+
+If you are building using kernel-devel packages and require ldiskfs
+server support then ensure that the matching kernel-debuginfo-common
+and kernel-debuginfo-common-<arch> packages are installed.
+
+])
+
+fi
])
#
AC_MSG_CHECKING([whether to build ldiskfs])
if test x$enable_ldiskfs_build = xyes; then
AC_MSG_RESULT([$enable_ldiskfs_build])
+ LDISKFS_SUBDIR="ldiskfs"
LB_CHECK_FILE([$LDISKFS_DIR/configure], [], [
AC_MSG_ERROR([Complete ldiskfs build system must exist])])
LB_LDISKFS_EXT_SOURCE
- LDISKFS_SUBDIR="ldiskfs"
AC_SUBST(LDISKFS_SUBDIR)
else
enable_ldiskfs_build='no'
return 1;
}
#else
-#include <linux/lustre_version.h>
-# if !(defined(CONFIG_X86) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,21))) || defined(CONFIG_X86_64) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && !defined(CONFIG_X86_HT))
+# if !defined(CONFIG_X86) || defined(CONFIG_X86_64) || !defined(CONFIG_X86_HT)
static inline int
ksocknal_nsched(void)
{
])
#
-# only for Lustre-patched kernels
-#
-AC_DEFUN([LC_LUSTRE_VERSION_H],
-[LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
- rm -f "$LUSTRE/include/linux/lustre_version.h"
-],[
- touch "$LUSTRE/include/linux/lustre_version.h"
- if test x$enable_server = xyes ; then
- AC_MSG_WARN([Unpatched kernel detected.])
- AC_MSG_WARN([Lustre servers cannot be built with an unpatched kernel;])
- AC_MSG_WARN([disabling server build])
- enable_server='no'
- fi
-])
-])
-
-#
# LC_FUNC_DEV_SET_RDONLY
#
# check whether dev_set_rdonly is exported. This is needed until we
# Lustre linux kernel checks
#
AC_DEFUN([LC_PROG_LINUX],
- [LC_LUSTRE_VERSION_H
+ [
LC_CONFIG_PINGER
LC_CONFIG_CHECKSUM
LC_CONFIG_LIBLUSTRE_RECOVERY
#ifndef LUSTRE_INTENT_H
#define LUSTRE_INTENT_H
-#include <linux/lustre_version.h>
-
/* intent IT_XXX are defined in lustre/include/obd.h */
struct lustre_intent_data {
int it_disposition;
#ifndef LUSTRE_PATCHLESS_COMPAT_H
#define LUSTRE_PATCHLESS_COMPAT_H
-#include <linux/lustre_version.h>
#include <linux/fs.h>
#ifndef HAVE_TRUNCATE_COMPLETE_PAGE
+This patch is no longer needed since Lustre 2.2. It is kept here to
+allow older versions of Lustre to build against the same kernel as
+Lustre 2.2 in order to allow upgrade of just Lustre without also
+replacing the kernel at the same time.
+
Version 47: allow the ext3_map_inode_page() created param to be NULL
Version 46: Separate ->fs_private in struct file
Version 45: more robust and general dev_read_only for failover (b=4834)
#include <lustre_lite.h>
#include <lustre/lustre_idl.h>
#include <lustre_dlm.h>
-//#include <lustre_ver.h>
-//#include <lustre_version.h>
#include "llite_internal.h"
#include <obd_support.h>
#include <lustre_lite.h>
#include <lustre_dlm.h>
-#include <linux/lustre_version.h>
#include "llite_internal.h"
#define SA_OMITTED_ENTRY_MAX 8ULL
ext3_ext_walk_space(tree, block, num, cb);
#endif
-#include <linux/lustre_version.h>
-
struct bpointers {
unsigned long *blocks;
int *created;
}
EXPORT_SYMBOL(simple_truncate);
-#ifdef LUSTRE_KERNEL_VERSION
int __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev)
{
#ifdef HAVE_DEV_SET_RDONLY
RETURN(rc);
}
EXPORT_SYMBOL(lvfs_check_io_health);
-#endif /* LUSTRE_KERNEL_VERSION */
void obd_update_maxusage()
{
#ifndef BUILD_VERSION
#define BUILD_VERSION "Unknown"
#endif
-#ifndef LUSTRE_KERNEL_VERSION
-#define LUSTRE_KERNEL_VERSION "Unknown Darwin version"
-#endif
cfs_sysctl_table_header_t *obd_table_header = NULL;
extern atomic_t obd_memory;
int read_build_version SYSCTL_HANDLER_ARGS;
-int read_lustre_kernel_version SYSCTL_HANDLER_ARGS;
SYSCTL_NODE (, OID_AUTO, lustre, CTLFLAG_RW,
0, "lustre sysctl top");
SYSCTL_PROC(_lustre, OID_AUTO, build_version,
CTLTYPE_STRING | CTLFLAG_RD , NULL,
0, &read_build_version, "A", "lustre_build_version");
-SYSCTL_PROC(_lustre, OID_AUTO, lustre_kernel_version,
- CTLTYPE_STRING | CTLFLAG_RD , NULL,
- 0, &read_lustre_kernel_version, "A", "lustre_build_version");
SYSCTL_INT(_lustre, OID_AUTO, dump_on_timeout,
CTLTYPE_INT | CTLFLAG_RW, &obd_dump_on_timeout,
0, "lustre_dump_on_timeout");
return error;
}
-int read_lustre_kernel_version SYSCTL_HANDLER_ARGS
-{
- int error = 0;
-
- error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req);
- if ( req->newptr != NULL) {
- printf("sysctl lustre_kernel_version is read-only!\n");
- } else {
- error = SYSCTL_OUT(req, LUSTRE_KERNEL_VERSION, strlen(LUSTRE_KERNEL_VERSION));
- }
- return error;
-}
-
void obd_sysctl_init (void)
{
#if 1
#include <lustre_ver.h>
#include <lustre/lustre_build_version.h>
#ifdef __KERNEL__
-#include <linux/lustre_version.h>
int proc_version;
}
RETURN(0);
}
-
-
-/* Check that we're building against the appropriate version of the Lustre
- * kernel patch */
-#include <linux/lustre_version.h>
-#ifdef LUSTRE_KERNEL_VERSION
-#define LUSTRE_MIN_VERSION 45
-#define LUSTRE_MAX_VERSION 47
-#if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION)
-# error Cannot continue: Your Lustre kernel patch is older than the sources
-#elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION)
-# error Cannot continue: Your Lustre sources are older than the kernel patch
-#endif
-#endif
#endif