summaryrefslogtreecommitdiff
path: root/random-test.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-02 09:47:58 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-02 09:47:58 -0500
commit11bc1cd2a565ab90f16dba2da40cba5e30128783 (patch)
tree4aff9b22200638211981451bbae62fd138a19581 /random-test.c
parenta71a25da6968d3b681a04f5f9289a2ea4e192a79 (diff)
Fix extent code to use merge during delete
Remove implicit commit in del_item and insert_item Add implicit commit to close() Add commit op in random-test
Diffstat (limited to 'random-test.c')
-rw-r--r--random-test.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/random-test.c b/random-test.c
index bbd554e8..22955753 100644
--- a/random-test.c
+++ b/random-test.c
@@ -59,6 +59,11 @@ error:
return -1;
}
+static int run_commit(struct ctree_root *root, struct radix_tree_root *radix)
+{
+ return commit_transaction(root);
+}
+
static int insert_dup(struct ctree_root *root, struct radix_tree_root *radix)
{
struct ctree_path path;
@@ -233,7 +238,8 @@ static int bulk_op(struct ctree_root *root, struct radix_tree_root *radix)
int (*ops[])(struct ctree_root *root, struct radix_tree_root *radix) =
-{ ins_one, insert_dup, del_one, lookup_item, lookup_enoent, bulk_op };
+ { ins_one, insert_dup, del_one, lookup_item,
+ lookup_enoent, bulk_op, run_commit };
static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix)
{
@@ -366,7 +372,7 @@ int main(int ac, char **av)
err = ret;
goto out;
}
- if (ops[op] == bulk_op)
+ if (ops[op] == bulk_op || ops[op] == run_commit)
break;
if (keep_running == 0) {
err = 0;