powerpc )
AC_MSG_RESULT($host_cpu)
- KCFLAGS='-O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
- KCPPFLAGS='-D__KERNEL__'
+ KCFLAGS='-O2 -g -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
+ KCPPFLAGS='-D__KERNEL__ -DMODULE'
MOD_LINK=elf32ppclinux
;;
AC_SUBST(LINUX25)
AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
+# ---------- Red Hat 2.4.18 has iobuf->dovary --------------
+# But other kernels don't
+
+AC_MSG_CHECKING([if struct kiobuf has a dovary field])
+AC_TRY_COMPILE([#define __KERNEL__
+ #include <linux/iobuf.h>],
+ [struct kiobuf iobuf;
+ iobuf.dovary = 1;],
+ [AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -DHAVE_KIOBUF_DOVARY"],
+ [AC_MSG_RESULT([no])])
+
# ---------- Red Hat 2.4.20 backports some 2.5 bits --------
# This needs to run after we've defined the KCPPFLAGS
#ifndef _P30_TYPES_H_
#define _P30_TYPES_H_
-#ifdef __linux__
+#ifdef __KERNEL__
+# include <linux/time.h>
# include <asm/types.h>
# include <asm/timex.h>
-#else
+#else /* !__KERNEL__ */
# include <sys/types.h>
+# include <sys/time.h>
typedef u_int32_t __u32;
typedef u_int64_t __u64;
-#endif
-
-#ifdef __KERNEL__
-# include <linux/time.h>
-#else
-# include <sys/time.h>
# define do_gettimeofday(tv) gettimeofday(tv, NULL)
-#endif
+# ifndef cycles_t
+typedef unsigned long cycles_t;
+# endif
+#endif /* !__KERNEL__ */
#include <portals/errno.h>
struct timeval arrival_time;
volatile ptl_seq_t sequence;
-} ptl_event_t;
+} __attribute__((packed)) ptl_event_t;
#ifdef __CYGWIN__
#pragma pop
#endif
#include <asm/system.h>
#include <asm/uaccess.h>
+#include <asm/irq.h>
#include <linux/init.h>
#include <linux/fs.h>
gmnalnid_SOURCES = gmnalnid.c
ptlctl_SOURCES = ptlctl.c
-ptlctl_LDADD = -L. -lptlctl -lncurses # -lefence
+ptlctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
ptlctl_DEPENDENCIES = libptlctl.a
debugctl_SOURCES = debugctl.c
-debugctl_LDADD = -L. -lptlctl -lncurses # -lefence
+debugctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
debugctl_DEPENDENCIES = libptlctl.a
routerstat_SOURCES = routerstat.c
LOGL(data->lcfg_inlbuf3, data->lcfg_inllen3, ptr);
if (data->lcfg_inlbuf4)
LOGL(data->lcfg_inlbuf4, data->lcfg_inllen4, ptr);
-// if (lustre_cfg_is_invalid(overlay))
-// return 1;
*plen = len;
lcfg = (struct lustre_cfg *)*buf;
if (lcfg->lcfg_version != LUSTRE_CFG_VERSION) {
- CERROR("Version mismatch kernel vs application\n");
+ CERROR("Version mismatch kernel: %#x application: %#x\n",
+ LUSTRE_CFG_VERSION, lcfg->lcfg_version);
return -EINVAL;
}
-// if (lustre_cfg_is_invalid(data)) {
-// CERROR("ioctl not correctly formatted\n");
-// return -EINVAL;
-// }
if (lcfg->lcfg_dev_name) {
lcfg->lcfg_dev_name = &lcfg->lcfg_bulk[0];
#include <linux/lustre_dlm.h>
#include <linux/obd_class.h>
+#include <portals/list.h>
#include "ldlm_internal.h"
extern kmem_cache_t *ldlm_resource_slab;
exp = class_conn2export(&mdc_conn);
ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
+#if 1
rc = class_config_parse_llog(ctxt, profile, cfg);
+#else
+ /*
+ * For debugging, it's useful to just dump the log
+ */
+ rc = class_config_dump_llog(ctxt, profile, cfg);
+#endif
if (rc) {
CERROR("class_config_parse_llog failed: rc = %d\n", rc);
}
CERROR("Unexpected: can't find mdc_open_data, but the "
"close succeeded. Please tell CFS.\n");
}
+ if (!lustre_swab_repbuf(req, 0, sizeof(struct mds_body),
+ lustre_swab_mds_body)) {
+ CERROR("Error unpacking mds_body\n");
+ rc = -EPROTO;
+ }
}
if (req->rq_async_args.pointer_arg[0] != NULL) {
CERROR("returned without dropping rpc_lock: rc %d\n", rc);
#endif
#define DEBUG_SUBSYSTEM S_MDS
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/version.h>
int cfg_len = rec->lrh_len;
char *cfg_buf = (char*) (rec + 1);
int rc = 0;
-
+ ENTRY;
if (rec->lrh_type == OBD_CFG_REC) {
char *buf;
struct lustre_cfg *lcfg;
int cfg_len = rec->lrh_len;
char *cfg_buf = (char*) (rec + 1);
int rc = 0;
-
+ ENTRY;
if (rec->lrh_type == OBD_CFG_REC) {
char *buf;
struct lustre_cfg *lcfg;
if (pcfg->pcfg_flags)
CDEBUG(D_INFO, " flags: %x\n",
pcfg->pcfg_flags);
+ } else {
+ CERROR("unhandled lrh_type: %#x\n", rec->lrh_type);
+ rc = -EINVAL;
}
out:
RETURN(rc);
#include <linux/lprocfs_status.h>
#include <linux/lustre_log.h>
#include <linux/lustre_commit_confd.h>
+#include <portals/list.h>
#include "filter_internal.h"
GOTO(cleanup, rc);
cleanup_phase = 1;
-#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,4,18))
+#ifdef HAVE_KIOBUF_DOVARY
iobuf->dovary = 0; /* this prevents corruption, not present in 2.4.20 */
#endif
rc = expand_kiobuf(iobuf, obj->ioo_bufcnt);
powerpc )
AC_MSG_RESULT($host_cpu)
- KCFLAGS='-O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
- KCPPFLAGS='-D__KERNEL__'
+ KCFLAGS='-O2 -g -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
+ KCPPFLAGS='-D__KERNEL__ -DMODULE'
MOD_LINK=elf32ppclinux
;;
AC_SUBST(LINUX25)
AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
+# ---------- Red Hat 2.4.18 has iobuf->dovary --------------
+# But other kernels don't
+
+AC_MSG_CHECKING([if struct kiobuf has a dovary field])
+AC_TRY_COMPILE([#define __KERNEL__
+ #include <linux/iobuf.h>],
+ [struct kiobuf iobuf;
+ iobuf.dovary = 1;],
+ [AC_MSG_RESULT([yes])
+ CPPFLAGS="$CPPFLAGS -DHAVE_KIOBUF_DOVARY"],
+ [AC_MSG_RESULT([no])])
+
# ---------- Red Hat 2.4.20 backports some 2.5 bits --------
# This needs to run after we've defined the KCPPFLAGS
#ifndef _P30_TYPES_H_
#define _P30_TYPES_H_
-#ifdef __linux__
+#ifdef __KERNEL__
+# include <linux/time.h>
# include <asm/types.h>
# include <asm/timex.h>
-#else
+#else /* !__KERNEL__ */
# include <sys/types.h>
+# include <sys/time.h>
typedef u_int32_t __u32;
typedef u_int64_t __u64;
-#endif
-
-#ifdef __KERNEL__
-# include <linux/time.h>
-#else
-# include <sys/time.h>
# define do_gettimeofday(tv) gettimeofday(tv, NULL)
-#endif
+# ifndef cycles_t
+typedef unsigned long cycles_t;
+# endif
+#endif /* !__KERNEL__ */
#include <portals/errno.h>
struct timeval arrival_time;
volatile ptl_seq_t sequence;
-} ptl_event_t;
+} __attribute__((packed)) ptl_event_t;
#ifdef __CYGWIN__
#pragma pop
#endif
#include <asm/system.h>
#include <asm/uaccess.h>
+#include <asm/irq.h>
#include <linux/init.h>
#include <linux/fs.h>
gmnalnid_SOURCES = gmnalnid.c
ptlctl_SOURCES = ptlctl.c
-ptlctl_LDADD = -L. -lptlctl -lncurses # -lefence
+ptlctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
ptlctl_DEPENDENCIES = libptlctl.a
debugctl_SOURCES = debugctl.c
-debugctl_LDADD = -L. -lptlctl -lncurses # -lefence
+debugctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
debugctl_DEPENDENCIES = libptlctl.a
routerstat_SOURCES = routerstat.c