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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user