diff options
Diffstat (limited to 'fs/btrfs/random-test.c')
-rw-r--r-- | fs/btrfs/random-test.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/btrfs/random-test.c b/fs/btrfs/random-test.c index 22955753c3a7..53245c5039dc 100644 --- a/fs/btrfs/random-test.c +++ b/fs/btrfs/random-test.c | |||
@@ -202,15 +202,23 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix, | |||
202 | int count) | 202 | int count) |
203 | { | 203 | { |
204 | int i; | 204 | int i; |
205 | int err; | ||
206 | int ret = 0; | 205 | int ret = 0; |
207 | for (i = 0; i < count; i++) { | 206 | for (i = 0; i < count; i++) { |
208 | ret = ins_one(root, radix); | 207 | ret = ins_one(root, radix); |
209 | if (ret) { | 208 | if (ret) { |
210 | printf("fill failed\n"); | 209 | fprintf(stderr, "fill failed\n"); |
211 | err = ret; | ||
212 | goto out; | 210 | goto out; |
213 | } | 211 | } |
212 | if (i % 1000 == 0) { | ||
213 | ret = commit_transaction(root); | ||
214 | if (ret) { | ||
215 | fprintf(stderr, "fill commit failed\n"); | ||
216 | return ret; | ||
217 | } | ||
218 | } | ||
219 | if (i % 10000 == 0) { | ||
220 | printf("bigfill %d\n", i); | ||
221 | } | ||
214 | if (!keep_running) | 222 | if (!keep_running) |
215 | break; | 223 | break; |
216 | } | 224 | } |