diff options
Diffstat (limited to 'fs/btrfs/tests/extent-buffer-tests.c')
| -rw-r--r-- | fs/btrfs/tests/extent-buffer-tests.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/btrfs/tests/extent-buffer-tests.c b/fs/btrfs/tests/extent-buffer-tests.c index f51963a8f929..4f8cbd1ec5ee 100644 --- a/fs/btrfs/tests/extent-buffer-tests.c +++ b/fs/btrfs/tests/extent-buffer-tests.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "../extent_io.h" | 22 | #include "../extent_io.h" |
| 23 | #include "../disk-io.h" | 23 | #include "../disk-io.h" |
| 24 | 24 | ||
| 25 | static int test_btrfs_split_item(void) | 25 | static int test_btrfs_split_item(u32 sectorsize, u32 nodesize) |
| 26 | { | 26 | { |
| 27 | struct btrfs_path *path; | 27 | struct btrfs_path *path; |
| 28 | struct btrfs_root *root; | 28 | struct btrfs_root *root; |
| @@ -40,7 +40,7 @@ static int test_btrfs_split_item(void) | |||
| 40 | 40 | ||
| 41 | test_msg("Running btrfs_split_item tests\n"); | 41 | test_msg("Running btrfs_split_item tests\n"); |
| 42 | 42 | ||
| 43 | root = btrfs_alloc_dummy_root(); | 43 | root = btrfs_alloc_dummy_root(sectorsize, nodesize); |
| 44 | if (IS_ERR(root)) { | 44 | if (IS_ERR(root)) { |
| 45 | test_msg("Could not allocate root\n"); | 45 | test_msg("Could not allocate root\n"); |
| 46 | return PTR_ERR(root); | 46 | return PTR_ERR(root); |
| @@ -53,7 +53,8 @@ static int test_btrfs_split_item(void) | |||
| 53 | return -ENOMEM; | 53 | return -ENOMEM; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | path->nodes[0] = eb = alloc_dummy_extent_buffer(NULL, 4096); | 56 | path->nodes[0] = eb = alloc_dummy_extent_buffer(NULL, nodesize, |
| 57 | nodesize); | ||
| 57 | if (!eb) { | 58 | if (!eb) { |
| 58 | test_msg("Could not allocate dummy buffer\n"); | 59 | test_msg("Could not allocate dummy buffer\n"); |
| 59 | ret = -ENOMEM; | 60 | ret = -ENOMEM; |
| @@ -222,8 +223,8 @@ out: | |||
| 222 | return ret; | 223 | return ret; |
| 223 | } | 224 | } |
| 224 | 225 | ||
| 225 | int btrfs_test_extent_buffer_operations(void) | 226 | int btrfs_test_extent_buffer_operations(u32 sectorsize, u32 nodesize) |
| 226 | { | 227 | { |
| 227 | test_msg("Running extent buffer operation tests"); | 228 | test_msg("Running extent buffer operation tests\n"); |
| 228 | return test_btrfs_split_item(); | 229 | return test_btrfs_split_item(sectorsize, nodesize); |
| 229 | } | 230 | } |
