Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128260
b: refs/heads/master
c: 77ce684
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Mar 2, 2007
1 parent 0987958 commit 713851e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0930a37f1c096c3a8f6a17b1e251c7fdf4d4457
refs/heads/master: 77ce6846c40e83193df01295e5af437f8b6c7a2d
3 changes: 1 addition & 2 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "disk-io.h"

static int allocated_blocks = 0;
int cache_size = 0;
int cache_max = 10000;

static int check_tree_block(struct ctree_root *root, struct tree_buffer *buf)
Expand All @@ -36,7 +35,7 @@ static int free_some_buffers(struct ctree_root *root)
list_del_init(&b->cache);
tree_block_release(root, b);
if (root->cache_size < cache_max)
return 0;
break;
}
}
return 0;
Expand Down
14 changes: 11 additions & 3 deletions trunk/fs/btrfs/random-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,23 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix,
int count)
{
int i;
int err;
int ret = 0;
for (i = 0; i < count; i++) {
ret = ins_one(root, radix);
if (ret) {
printf("fill failed\n");
err = ret;
fprintf(stderr, "fill failed\n");
goto out;
}
if (i % 1000 == 0) {
ret = commit_transaction(root);
if (ret) {
fprintf(stderr, "fill commit failed\n");
return ret;
}
}
if (i % 10000 == 0) {
printf("bigfill %d\n", i);
}
if (!keep_running)
break;
}
Expand Down

0 comments on commit 713851e

Please sign in to comment.