Whamcloud - gitweb
Create a .cvsignore for this directory.
[fs/lustre-release.git] / lnet / selftest / console.h
index cc72930..685bad2 100644 (file)
@@ -1,11 +1,43 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- * Author: Liang Zhen <liangzhen@clusterfs.com>
- * 
- * This file is part of Lustre, http://www.lustre.org
+ * GPL HEADER START
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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 version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Use is subject to license terms.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * lnet/selftest/console.h
  *
  * kernel structure for LST console
+ *
+ * Author: Liang Zhen <liangzhen@clusterfs.com>
  */
 
 #ifndef __LST_CONSOLE_H__
@@ -13,7 +45,7 @@
 
 #ifdef __KERNEL__
 
-#include <libcfs/kp30.h>
+#include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/lnetst.h>
@@ -38,6 +70,7 @@ typedef struct {
 typedef struct {
         struct list_head        grp_link;       /* chain on global group list */
         int                     grp_ref;        /* reference count */
+        int                     grp_userland;   /* has userland nodes */
         int                     grp_nnode;      /* # of nodes */
         char                    grp_name[LST_NAME_SIZE]; /* group name */
 
@@ -123,8 +156,7 @@ typedef struct {
         struct list_head       *ses_ndl_hash;   /* hash table of nodes */
 
         spinlock_t              ses_rpc_lock;   /* serialize */
-        int                     ses_rpc_pending; /* number of pending RPCs */
-        struct list_head        ses_rpc_list;   /* list head of RPCs */
+        atomic_t                ses_rpc_counter;/* # of initialized RPCs */
         struct list_head        ses_rpc_freelist; /* idle console rpc */
 } lstcon_session_t;                             /*** session descriptor */
 
@@ -184,7 +216,7 @@ extern int lstcon_nodes_stat(int count, lnet_process_id_t *ids_up,
                              int timeout, struct list_head *result_up);
 extern int lstcon_test_add(char *name, int type, int loop, int concur,
                            int dist, int span, char *src_name, char * dst_name,
-                           void *param, int paramlen, struct list_head *result_up);
+                           void *param, int paramlen, int *retp, struct list_head *result_up);
 #endif
 
 #endif