btrfs-progs: use stripe_len define here

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Anand Jain 2013-12-16 20:33:58 +08:00 committed by Chris Mason
parent 5e5fd1b9ed
commit 91bc44bd07
3 changed files with 5 additions and 5 deletions

View File

@ -1713,7 +1713,7 @@ static int prepare_system_chunk_sb(struct btrfs_super_block *super)
btrfs_set_stack_chunk_length(chunk, btrfs_super_total_bytes(super));
btrfs_set_stack_chunk_owner(chunk, BTRFS_EXTENT_TREE_OBJECTID);
btrfs_set_stack_chunk_stripe_len(chunk, 64 * 1024);
btrfs_set_stack_chunk_stripe_len(chunk, BTRFS_STRIPE_LEN);
btrfs_set_stack_chunk_type(chunk, BTRFS_BLOCK_GROUP_SYSTEM);
btrfs_set_stack_chunk_io_align(chunk, sectorsize);
btrfs_set_stack_chunk_io_width(chunk, sectorsize);

View File

@ -1350,7 +1350,7 @@ static void update_super_old(u8 *buffer)
btrfs_set_stack_chunk_length(chunk, (u64)-1);
btrfs_set_stack_chunk_owner(chunk, BTRFS_EXTENT_TREE_OBJECTID);
btrfs_set_stack_chunk_stripe_len(chunk, 64 * 1024);
btrfs_set_stack_chunk_stripe_len(chunk, BTRFS_STRIPE_LEN);
btrfs_set_stack_chunk_type(chunk, BTRFS_BLOCK_GROUP_SYSTEM);
btrfs_set_stack_chunk_io_align(chunk, sectorsize);
btrfs_set_stack_chunk_io_width(chunk, sectorsize);

View File

@ -655,7 +655,7 @@ static u64 chunk_bytes_by_type(u64 type, u64 calc_size, int num_stripes,
static u32 find_raid56_stripe_len(u32 data_devices, u32 dev_stripe_target)
{
/* TODO, add a way to store the preferred stripe size */
return 64 * 1024;
return BTRFS_STRIPE_LEN;
}
/*
@ -773,7 +773,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
int looped = 0;
int ret;
int index;
int stripe_len = 64 * 1024;
int stripe_len = BTRFS_STRIPE_LEN;
struct btrfs_key key;
u64 offset;
@ -1010,7 +1010,7 @@ int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
int sub_stripes = 0;
int ret;
int index;
int stripe_len = 64 * 1024;
int stripe_len = BTRFS_STRIPE_LEN;
struct btrfs_key key;
key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;