Btrfs: self-tests: Support non-4k page size

self-tests code assumes 4k as the sectorsize and nodesize. This commit
fix hardcoded 4K. Enables the self-tests code to be executed on non-4k
page sized systems (e.g. ppc64).

Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com>
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
このコミットが含まれているのは:
Feifei Xu
2016-06-01 19:18:25 +08:00
committed by David Sterba
コミット b9ef22dedd
15個のファイルの変更357行の追加293行の削除

ファイルの表示

@@ -2319,27 +2319,31 @@ static void btrfs_print_mod_info(void)
static int btrfs_run_sanity_tests(void)
{
int ret;
u32 sectorsize, nodesize;
sectorsize = PAGE_SIZE;
nodesize = PAGE_SIZE;
ret = btrfs_init_test_fs();
if (ret)
return ret;
ret = btrfs_test_free_space_cache();
ret = btrfs_test_free_space_cache(sectorsize, nodesize);
if (ret)
goto out;
ret = btrfs_test_extent_buffer_operations();
ret = btrfs_test_extent_buffer_operations(sectorsize,
nodesize);
if (ret)
goto out;
ret = btrfs_test_extent_io();
ret = btrfs_test_extent_io(sectorsize, nodesize);
if (ret)
goto out;
ret = btrfs_test_inodes();
ret = btrfs_test_inodes(sectorsize, nodesize);
if (ret)
goto out;
ret = btrfs_test_qgroups();
ret = btrfs_test_qgroups(sectorsize, nodesize);
if (ret)
goto out;
ret = btrfs_test_free_space_tree();
ret = btrfs_test_free_space_tree(sectorsize, nodesize);
out:
btrfs_destroy_test_fs();
return ret;