Skip to content
Commit e57cf21e authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: fix allocation size calculations in alloc_btrfs_bio

Since commit 8e5cfb55

 (Btrfs: Make raid_map array be inlined in
btrfs_bio structure), the raid map array is allocated along with the
btrfs bio in alloc_btrfs_bio.  The calculation used to decide how much
we need to allocate was using the wrong parameter passed into the
allocation function.

The passed in real_stripes will be zero if a target replace operation
is not currently running.  We want to use total_stripes instead.

Signed-off-by: default avatarChris Mason <clm@fb.com>
Reported-by: default avatarDavid Sterba <dsterba@suse.cz>
Tested-by: default avatarDavid Sterba <dsterba@suse.cz>
parent a742994a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment