--- /dev/null
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * lustre/lib/fsfilt_ext3.c
+ * Lustre filesystem abstraction routines
+ *
+ * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
+ * Author: Andreas Dilger <adilger@clusterfs.com>
+ *
+ * This file is part of Lustre, http://www.lustre.org.
+ *
+ * Lustre is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * Lustre is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Lustre; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <liblustre.h>
+#include <linux/lvfs.h>
+#include "lvfs_internal.h"
+
+#include <linux/obd.h>
+#include <linux/lustre_lib.h>
+
+/* XXX currently ctxt functions should not be used ?? */
+void push_ctxt(struct obd_run_ctxt *save, struct obd_run_ctxt *new_ctx,
+ struct obd_ucred *uc)
+{
+ LBUG();
+}
+
+void pop_ctxt(struct obd_run_ctxt *saved, struct obd_run_ctxt *new_ctx,
+ struct obd_ucred *uc)
+{
+ LBUG();
+}
LASSERT(lock != NULL);
l_lock(&lock->l_resource->lr_namespace->ns_lock);
-#if !defined(LIBLUSTRE)
+#ifdef __KERNEL__
if (lock->l_ast_data && lock->l_ast_data != data) {
struct inode *new_inode = data;
struct inode *old_inode = lock->l_ast_data;
void ptlrpc_request_handle_notconn(struct ptlrpc_request *);
void lustre_assert_wire_constants(void);
+#ifdef __KERNEL__
void ptlrpc_lprocfs_register_service(struct proc_dir_entry *proc_entry,
struct ptlrpc_service *svc);
void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc);
void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req);
+void ptlrpc_lprocfs_do_request_stat (struct ptlrpc_request *req,
+ long q_usec, long work_usec);
+#else
+#define ptlrpc_lprocfs_register_service(params...) do{}while(0)
+#define ptlrpc_lprocfs_unregister_service(params...) do{}while(0)
+#define ptlrpc_lprocfs_rpc_sent(params...) do{}while(0)
+#define ptlrpc_lprocfs_do_request_stat(params...) do{}while(0)
+#endif /* __KERNEL__ */
/* recovd_thread.c */
int llog_init_commit_master(void);
RETURN(0);
}
+#ifdef __KERNEL__
static void __exit ptlrpc_exit(void)
{
ldlm_exit();
EXPORT_SYMBOL(llog_origin_handle_close);
EXPORT_SYMBOL(llog_client_ops);
-#ifdef __KERNEL__
MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
MODULE_DESCRIPTION("Lustre Request Processor and Lock Management");
MODULE_LICENSE("GPL");
--- /dev/null
+#!/bin/bash
+
+# liblustre sanity test. specially written for UML for now
+
+LCONF=${LCONF:-../utils/lconf}
+
+LLIP=127.0.0.1
+
+LTREE_KERNEL=${LTREE_KERNEL:-../../lustre}
+LTREE_USER=${LTREE_USER:-../../lustre-lib}
+
+# checking
+if [ ! -e $LTREE_KERNEL ]; then
+ echo "$LTREE_KERNEL dosen't exits"
+ exit 1
+fi
+
+if [ ! -e $LTREE_USER ]; then
+ echo "$LTREE_USER dosen't exits"
+ exit 1
+fi
+
+if [ ! -e $LTREE_USER/liblustre/lltest ]; then
+ echo "$LTREE_USER/liblustre/lltest dosen't exits"
+ exit 1
+fi
+
+workdir=`pwd`
+
+cleanup()
+{
+ curdir=`pwd`
+ cd $LTREE_KERNEL/tests
+ $LCONF --node localhost --cleanup --force $LTREE_USER/tests/$configfile 2>&1 > /dev/null
+ cd $curdir
+}
+
+configfile=liblustre_sanity_uml.xml
+
+# generate config file
+rm -f $configfile
+MDSNODE=localhost OSTNODES=localhost CLIENTS=$LLIP sh uml.sh $configfile
+if [ ! -e $configfile ]; then
+ echo "fail to generate config file $configfile"
+ exit 1
+fi
+
+# generate dump file
+rm -f /tmp/DUMP_FILE
+$LCONF --lctl_dump /tmp/DUMP_FILE --node $LLIP $configfile
+if [ ! -e /tmp/DUMP_FILE ]; then
+ echo "error creating dumpfile"
+ exit 1
+fi
+
+#setup lustre server
+cd $LTREE_KERNEL/tests
+$LCONF --node localhost --reformat $LTREE_USER/tests/$configfile
+rc=$?
+if [ $rc -ne 0 ]; then
+ echo "setup lustre server: error $rc"
+ cleanup
+ exit 1
+fi
+cd $workdir
+
+#do liblustre testing
+$LTREE_USER/liblustre/lltest
+rc=$?
+if [ $rc -ne 0 ]; then
+ echo "liblustre test error $rc"
+ cleanup
+ exit 1
+fi
+
+echo "===== liblustre sanity test complete sucessfully ====="
+
+echo -n "===== cleanup... "; cleanup; echo "done ====="
+
+cd $workdir
+
+exit 0