]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use a btrfs bioset instead of abusing bio internals
authorChris Mason <chris.mason@fusionio.com>
Fri, 17 May 2013 22:30:14 +0000 (18:30 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sat, 18 May 2013 01:52:52 +0000 (21:52 -0400)
commit99e0b3913f925d744ef8352cbd59d5d91dc5637e
treea43b9ce18f66482abf055d87b3ceec02a84477e7
parent349a924c396c089ad0457536cb7ca06884fdad12
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>
fs/btrfs/check-integrity.c
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c
fs/btrfs/raid56.c
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h