diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-05-18 00:30:14 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-05-18 03:52:52 +0200 |
commit | 9be3395bcd4ad4af76476ac38152b4cafa6b6159 (patch) | |
tree | a43b9ce18f66482abf055d87b3ceec02a84477e7 /fs/btrfs/raid56.c | |
parent | Btrfs: allow superblock mismatch from older mkfs (diff) | |
download | linux-9be3395bcd4ad4af76476ac38152b4cafa6b6159.tar.xz linux-9be3395bcd4ad4af76476ac38152b4cafa6b6159.zip |
Btrfs: use a btrfs bioset instead of abusing bio internals
Btrfs has been pointer tagging bi_private and using bi_bdev
to store the stripe index and mirror number of failed IOs.
As bios bubble back up through the call chain, we use these
to decide if and how to retry our IOs. They are also used
to count IO failures on a per device basis.
Recently a bio tracepoint was added lead to crashes because
we were abusing bi_bdev.
This commit adds a btrfs bioset, and creates explicit fields
for the mirror number and stripe index. The plan is to
extend this structure for all of the fields currently in
struct btrfs_bio, which will mean one less kmalloc in
our IO path.
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Reported-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'fs/btrfs/raid56.c')
-rw-r--r-- | fs/btrfs/raid56.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 0740621daf6c..0525e1389f5b 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1050,7 +1050,7 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, } /* put a new bio on the list */ - bio = bio_alloc(GFP_NOFS, bio_max_len >> PAGE_SHIFT?:1); + bio = btrfs_io_bio_alloc(GFP_NOFS, bio_max_len >> PAGE_SHIFT?:1); if (!bio) return -ENOMEM; |