diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-02 09:47:58 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-02 09:47:58 -0500 |
commit | f0930a37f1c096c3a8f6a17b1e251c7fdf4d4457 (patch) | |
tree | 51b569606b25cd5ef903f9ef97734a1f6ec291d2 /fs/btrfs/random-test.c | |
parent | ed2ff2cba766dfe7976a0113f667c9a0a50dff02 (diff) | |
download | talos-obmc-linux-f0930a37f1c096c3a8f6a17b1e251c7fdf4d4457.tar.gz talos-obmc-linux-f0930a37f1c096c3a8f6a17b1e251c7fdf4d4457.zip |
Btrfs: 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
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/random-test.c')
-rw-r--r-- | fs/btrfs/random-test.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/random-test.c b/fs/btrfs/random-test.c index bbd554e88db2..22955753c3a7 100644 --- a/fs/btrfs/random-test.c +++ b/fs/btrfs/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; |