Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modify changelog to use LustreNetLink instead of seq_file
[fs/lustre-release.git]
/
lustre
/
tests
/
it_test.c
diff --git
a/lustre/tests/it_test.c
b/lustre/tests/it_test.c
index
76515d5
..
39ae318
100644
(file)
--- a/
lustre/tests/it_test.c
+++ b/
lustre/tests/it_test.c
@@
-16,8
+16,8
@@
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* 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
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
@@
-84,13
+84,11
@@
static enum interval_iter cb(struct interval_node *n, void *args)
static int count = 1;
if (node->hit == 1) {
static int count = 1;
if (node->hit == 1) {
-
dprintf("NODE "__S" has ever been accesse
d\n",
-
__F(&n->in_extent));
+
error("A duplicate node "__S" access foun
d\n",
+ __F(&n->in_extent));
return INTERVAL_ITER_CONT;
return INTERVAL_ITER_CONT;
- error("duplicate node accessing found\n");
- return INTERVAL_ITER_STOP;
}
}
-
+
if (node->valid == 0) {
error("A deleted node "__S" being accessed\n",
__F(&n->in_extent));
if (node->valid == 0) {
error("A deleted node "__S" being accessed\n",
__F(&n->in_extent));
@@
-128,23
+126,23
@@
static int it_test_search(struct interval_node *root)
interval_search(root, &ext, cb, NULL);
dprintf("\nverifing ...");
interval_search(root, &ext, cb, NULL);
dprintf("\nverifing ...");
-
+
/* verify */
for (i = 0; i < it_count; i++) {
n = &it_array[i];
if (n->valid == 0)
continue;
/* verify */
for (i = 0; i < it_count; i++) {
n = &it_array[i];
if (n->valid == 0)
continue;
- if (extent_overlapped(&ext, &n->node.in_extent) &&
+ if (extent_overlapped(&ext, &n->node.in_extent) &&
n->hit == 0)
error("node "__S" overlaps" __S","
n->hit == 0)
error("node "__S" overlaps" __S","
- "but never to be hit.\n",
+ "but never to be hit.\n",
__F(&n->node.in_extent),
__F(&ext));
__F(&n->node.in_extent),
__F(&ext));
- if (!extent_overlapped(&ext, &n->node.in_extent) &&
+ if (!extent_overlapped(&ext, &n->node.in_extent) &&
n->hit)
n->hit)
- error("node "__S" overlaps" __S", but hit.\n",
+ error("node "__S" overlaps" __S", but hit.\n",
__F(&n->node.in_extent),
__F(&ext));
}
__F(&n->node.in_extent),
__F(&ext));
}
@@
-245,8
+243,9
@@
static enum interval_iter sanity_cb(struct interval_node *node, void *args)
}
if (!has) {
}
if (!has) {
- int count
= 1
;
+ int count;
err:
err:
+ count = 1;
dprintf("node"__S":%llu Child list:\n",
node->in_extent.start,
node->in_extent.end,
dprintf("node"__S":%llu Child list:\n",
node->in_extent.start,
node->in_extent.end,
@@
-284,7
+283,7
@@
err:
}
if (nr)
error("wrong tree, unbalanced!\n");
}
if (nr)
error("wrong tree, unbalanced!\n");
-
+
return 0;
}
return 0;
}
@@
-340,7
+339,7
@@
static int it_test_search_hole(struct interval_node *root)
return 0;
}
return 0;
}
-static int contended_count = 0;
+static int contended_count = 0;
#define LOOP_COUNT 1000
static enum interval_iter perf_cb(struct interval_node *n, void *args)
{
#define LOOP_COUNT 1000
static enum interval_iter perf_cb(struct interval_node *n, void *args)
{
@@
-355,7
+354,7
@@
static inline long tv_delta(struct timeval *s, struct timeval *e)
long c = e->tv_sec - s->tv_sec;
c *= 1000;
c += (long int)(e->tv_usec - s->tv_usec) / 1000;
long c = e->tv_sec - s->tv_sec;
c *= 1000;
c += (long int)(e->tv_usec - s->tv_usec) / 1000;
- dprintf("\tStart: %lu:%lu -> End: %lu:%lu\n",
+ dprintf("\tStart: %lu:%lu -> End: %lu:%lu\n",
s->tv_sec, s->tv_usec, e->tv_sec, e->tv_usec);
return c;
}
s->tv_sec, s->tv_usec, e->tv_sec, e->tv_usec);
return c;
}
@@
-367,7
+366,7
@@
static int it_test_performance(struct interval_node *root, unsigned long len)
struct it_node *n;
struct timeval start, end;
unsigned long count;
struct it_node *n;
struct timeval start, end;
unsigned long count;
-
+
ext.start = (random() % (max_count - len)) & ALIGN_MASK;
ext.end = (ext.start + len) & ALIGN_MASK;
if (have_wide_lock) {
ext.start = (random() % (max_count - len)) & ALIGN_MASK;
ext.end = (ext.start + len) & ALIGN_MASK;
if (have_wide_lock) {
@@
-421,7
+420,7
@@
static struct interval_node *it_test_helper(struct interval_node *root)
if (n->valid) {
if (!interval_find(root, &n->node.in_extent))
error("Cannot find an existent node\n");
if (n->valid) {
if (!interval_find(root, &n->node.in_extent))
error("Cannot find an existent node\n");
- dprintf("Erasing a node "__S"\n",
+ dprintf("Erasing a node "__S"\n",
__F(&n->node.in_extent));
interval_erase(&n->node, &root);
n->valid = 0;
__F(&n->node.in_extent));
interval_erase(&n->node, &root);
n->valid = 0;
@@
-435,7
+434,7
@@
static struct interval_node *it_test_helper(struct interval_node *root)
interval_set(&n->node, low, high);
while (interval_insert(&n->node, &root))
interval_set(&n->node, low, ++high);
interval_set(&n->node, low, high);
while (interval_insert(&n->node, &root))
interval_set(&n->node, low, ++high);
- dprintf("Adding a node "__S"\n",
+ dprintf("Adding a node "__S"\n",
__F(&n->node.in_extent));
n->valid = 1;
list_add(&n->list, &header);
__F(&n->node.in_extent));
n->valid = 1;
list_add(&n->list, &header);