diff options
author | Feifei Xu <xufeifei@linux.vnet.ibm.com> | 2016-06-01 19:18:25 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-06-02 19:23:14 +0200 |
commit | b9ef22dedde08ab1b4ccd5f53344984c4dcb89f4 (patch) | |
tree | 82c6a1483dfdd040c1e0cdb7a9bfec06d351cd3a /fs/btrfs/tests/btrfs-tests.c | |
parent | 0ef6447a3d2f014e49069c4da33f905ed803aa2a (diff) | |
download | blackbird-op-linux-b9ef22dedde08ab1b4ccd5f53344984c4dcb89f4.tar.gz blackbird-op-linux-b9ef22dedde08ab1b4ccd5f53344984c4dcb89f4.zip |
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>
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index f54bf450bad3..10eb249ef891 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -175,7 +175,7 @@ void btrfs_free_dummy_root(struct btrfs_root *root) } struct btrfs_block_group_cache * -btrfs_alloc_dummy_block_group(unsigned long length) +btrfs_alloc_dummy_block_group(unsigned long length, u32 sectorsize) { struct btrfs_block_group_cache *cache; @@ -192,8 +192,8 @@ btrfs_alloc_dummy_block_group(unsigned long length) cache->key.objectid = 0; cache->key.offset = length; cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; - cache->sectorsize = 4096; - cache->full_stripe_len = 4096; + cache->sectorsize = sectorsize; + cache->full_stripe_len = sectorsize; INIT_LIST_HEAD(&cache->list); INIT_LIST_HEAD(&cache->cluster_list); |