]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid I/O repair BUG() from btree_read_extent_buffer_pages()
authorStefan Behrens <sbehrens@giantdisaster.de>
Tue, 10 Jul 2012 13:30:17 +0000 (07:30 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 23 Jul 2012 20:27:59 +0000 (16:27 -0400)
commit47960b87ec3a875b4f650f81d692a30c2bd78e7c
tree32112f1d030743f5a9ef01cade8481b906934074
parent1a67a83ec809b3a93d338aca2310fd478c72f93c
Btrfs: avoid I/O repair BUG() from btree_read_extent_buffer_pages()

From btree_read_extent_buffer_pages(), currently repair_io_failure()
can be called with mirror_num being zero when submit_one_bio() returned
an error before. This used to cause a BUG_ON(!mirror_num) in
repair_io_failure() and indeed this is not a case that needs the I/O
repair code to rewrite disk blocks.
This commit prevents calling repair_io_failure() in this case and thus
avoids the BUG_ON() and malfunction.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c