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) |
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: | |||
59 | return -1; | 59 | return -1; |
60 | } | 60 | } |
61 | 61 | ||
62 | static int run_commit(struct ctree_root *root, struct radix_tree_root *radix) | ||
63 | { | ||
64 | return commit_transaction(root); | ||
65 | } | ||
66 | |||
62 | static int insert_dup(struct ctree_root *root, struct radix_tree_root *radix) | 67 | static int insert_dup(struct ctree_root *root, struct radix_tree_root *radix) |
63 | { | 68 | { |
64 | struct ctree_path path; | 69 | struct ctree_path path; |
@@ -233,7 +238,8 @@ static int bulk_op(struct ctree_root *root, struct radix_tree_root *radix) | |||
233 | 238 | ||
234 | 239 | ||
235 | int (*ops[])(struct ctree_root *root, struct radix_tree_root *radix) = | 240 | int (*ops[])(struct ctree_root *root, struct radix_tree_root *radix) = |
236 | { ins_one, insert_dup, del_one, lookup_item, lookup_enoent, bulk_op }; | 241 | { ins_one, insert_dup, del_one, lookup_item, |
242 | lookup_enoent, bulk_op, run_commit }; | ||
237 | 243 | ||
238 | static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix) | 244 | static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix) |
239 | { | 245 | { |
@@ -366,7 +372,7 @@ int main(int ac, char **av) | |||
366 | err = ret; | 372 | err = ret; |
367 | goto out; | 373 | goto out; |
368 | } | 374 | } |
369 | if (ops[op] == bulk_op) | 375 | if (ops[op] == bulk_op || ops[op] == run_commit) |
370 | break; | 376 | break; |
371 | if (keep_running == 0) { | 377 | if (keep_running == 0) { |
372 | err = 0; | 378 | err = 0; |