aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/random-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/random-test.c')
-rw-r--r--fs/btrfs/random-test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/random-test.c b/fs/btrfs/random-test.c
index 53245c5039dc..dcc852ad6737 100644
--- a/fs/btrfs/random-test.c
+++ b/fs/btrfs/random-test.c
@@ -93,7 +93,7 @@ static int del_one(struct ctree_root *root, struct radix_tree_root *radix)
93 ret = setup_key(radix, &key, 1); 93 ret = setup_key(radix, &key, 1);
94 if (ret < 0) 94 if (ret < 0)
95 return 0; 95 return 0;
96 ret = search_slot(root, &key, &path, -1); 96 ret = search_slot(root, &key, &path, -1, 1);
97 if (ret) 97 if (ret)
98 goto error; 98 goto error;
99 ret = del_item(root, &path); 99 ret = del_item(root, &path);
@@ -118,7 +118,7 @@ static int lookup_item(struct ctree_root *root, struct radix_tree_root *radix)
118 ret = setup_key(radix, &key, 1); 118 ret = setup_key(radix, &key, 1);
119 if (ret < 0) 119 if (ret < 0)
120 return 0; 120 return 0;
121 ret = search_slot(root, &key, &path, 0); 121 ret = search_slot(root, &key, &path, 0, 1);
122 release_path(root, &path); 122 release_path(root, &path);
123 if (ret) 123 if (ret)
124 goto error; 124 goto error;
@@ -137,7 +137,7 @@ static int lookup_enoent(struct ctree_root *root, struct radix_tree_root *radix)
137 ret = setup_key(radix, &key, 0); 137 ret = setup_key(radix, &key, 0);
138 if (ret < 0) 138 if (ret < 0)
139 return ret; 139 return ret;
140 ret = search_slot(root, &key, &path, 0); 140 ret = search_slot(root, &key, &path, 0, 0);
141 release_path(root, &path); 141 release_path(root, &path);
142 if (ret <= 0) 142 if (ret <= 0)
143 goto error; 143 goto error;
@@ -163,7 +163,7 @@ static int empty_tree(struct ctree_root *root, struct radix_tree_root *radix,
163 key.objectid = (unsigned long)-1; 163 key.objectid = (unsigned long)-1;
164 while(nr-- >= 0) { 164 while(nr-- >= 0) {
165 init_path(&path); 165 init_path(&path);
166 ret = search_slot(root, &key, &path, -1); 166 ret = search_slot(root, &key, &path, -1, 1);
167 if (ret < 0) { 167 if (ret < 0) {
168 release_path(root, &path); 168 release_path(root, &path);
169 return ret; 169 return ret;
@@ -216,7 +216,7 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix,
216 return ret; 216 return ret;
217 } 217 }
218 } 218 }
219 if (i % 10000 == 0) { 219 if (i && i % 10000 == 0) {
220 printf("bigfill %d\n", i); 220 printf("bigfill %d\n", i);
221 } 221 }
222 if (!keep_running) 222 if (!keep_running)
@@ -263,7 +263,7 @@ static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix)
263 key.objectid = (unsigned long)-1; 263 key.objectid = (unsigned long)-1;
264 while(1) { 264 while(1) {
265 init_path(&path); 265 init_path(&path);
266 ret = search_slot(root, &key, &path, 0); 266 ret = search_slot(root, &key, &path, 0, 0);
267 if (ret < 0) { 267 if (ret < 0) {
268 release_path(root, &path); 268 release_path(root, &path);
269 return ret; 269 return ret;