Whamcloud - gitweb
b=24201 add procfs tunable to enable/disable lockless direct I/O
[fs/lustre-release.git] / lustre / tests / it_test.c
index 76515d5..a97a9bc 100644 (file)
@@ -16,8 +16,8 @@
  * 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 [sun.com URL with a
- * copy of GPLv2].
+ * 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
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -45,7 +45,7 @@
 #include <time.h>
 #include <sys/time.h>
 
-#include <libcfs/libcfs.h>
+#include <libcfs/kp30.h>
 #include <../ldlm/interval_tree.c>
 
 #define dprintf(fmt, args...) //printf(fmt, ##args)
@@ -67,7 +67,7 @@ static struct it_node {
         int hit, valid;
 } *it_array;
 static int it_count;
-static CFS_LIST_HEAD(header);
+CFS_LIST_HEAD(header);
 static unsigned long max_count = ULONG_MAX & ALIGN_MASK;
 static int have_wide_lock = 0;
 
@@ -84,11 +84,9 @@ static enum interval_iter cb(struct interval_node *n, void *args)
         static int count = 1;
 
         if (node->hit == 1) {
-                dprintf("NODE "__S" has ever been accessed\n",
-                        __F(&n->in_extent));
+                error("A duplicate node "__S" access found\n",
+                       __F(&n->in_extent));
                 return INTERVAL_ITER_CONT;
-                error("duplicate node accessing found\n");
-                return INTERVAL_ITER_STOP;
         }
         
         if (node->valid == 0) {
@@ -245,8 +243,9 @@ static enum interval_iter sanity_cb(struct interval_node *node, void *args)
         }
 
         if (!has) {
-                int count = 1;
+                int count;
 err:
+                count = 1;
                 dprintf("node"__S":%llu Child list:\n",
                         node->in_extent.start,
                         node->in_extent.end,