aboutsummaryrefslogtreecommitdiffstats
path: root/random-test.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-02 16:08:05 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-02 16:08:05 -0500
commit7da449a2f634d1807a5aaa8cd8dceb360032343e (patch)
tree0e24fc3d477ed17dd7f127022dddc55f30b8a782 /random-test.c
parentbd530a2cff3945b4f79f591f936315b9f6d2929f (diff)
downloadbtrfs-progs-7da449a2f634d1807a5aaa8cd8dceb360032343e.tar.gz
btrfs-progs-7da449a2f634d1807a5aaa8cd8dceb360032343e.tar.xz
btrfs-progs-7da449a2f634d1807a5aaa8cd8dceb360032343e.zip
early reference counting
Diffstat (limited to 'random-test.c')
-rw-r--r--random-test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/random-test.c b/random-test.c
index 53245c5..dcc852a 100644
--- a/random-test.c
+++ b/random-test.c
@@ -93,7 +93,7 @@ static int del_one(struct ctree_root *root, struct radix_tree_root *radix)
ret = setup_key(radix, &key, 1);
if (ret < 0)
return 0;
- ret = search_slot(root, &key, &path, -1);
+ ret = search_slot(root, &key, &path, -1, 1);
if (ret)
goto error;
ret = del_item(root, &path);
@@ -118,7 +118,7 @@ static int lookup_item(struct ctree_root *root, struct radix_tree_root *radix)
ret = setup_key(radix, &key, 1);
if (ret < 0)
return 0;
- ret = search_slot(root, &key, &path, 0);
+ ret = search_slot(root, &key, &path, 0, 1);
release_path(root, &path);
if (ret)
goto error;
@@ -137,7 +137,7 @@ static int lookup_enoent(struct ctree_root *root, struct radix_tree_root *radix)
ret = setup_key(radix, &key, 0);
if (ret < 0)
return ret;
- ret = search_slot(root, &key, &path, 0);
+ ret = search_slot(root, &key, &path, 0, 0);
release_path(root, &path);
if (ret <= 0)
goto error;
@@ -163,7 +163,7 @@ static int empty_tree(struct ctree_root *root, struct radix_tree_root *radix,
key.objectid = (unsigned long)-1;
while(nr-- >= 0) {
init_path(&path);
- ret = search_slot(root, &key, &path, -1);
+ ret = search_slot(root, &key, &path, -1, 1);
if (ret < 0) {
release_path(root, &path);
return ret;
@@ -216,7 +216,7 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix,
return ret;
}
}
- if (i % 10000 == 0) {
+ if (i && i % 10000 == 0) {
printf("bigfill %d\n", i);
}
if (!keep_running)
@@ -263,7 +263,7 @@ static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix)
key.objectid = (unsigned long)-1;
while(1) {
init_path(&path);
- ret = search_slot(root, &key, &path, 0);
+ ret = search_slot(root, &key, &path, 0, 0);
if (ret < 0) {
release_path(root, &path);
return ret;