From: liubo Date: Wed, 27 Jul 2011 09:49:18 +0000 (+0000) Subject: Btrfs: fix oops while writing data to SSD partitions X-Git-Tag: v3.1-rc1~82^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff1f2b4407454d926d8b143bf37e4dce66026a28;p=pandora-kernel.git Btrfs: fix oops while writing data to SSD partitions Here I have a two SSD-partitions btrfs, and they are defaultly set to "data=raid0, metadata=raid1", then I try to fill my btrfs partition till "No space left on device", via "dd if=/dev/zero of=/mnt/btrfs/tmp". I get an oops panic from kernel BUG at fs/btrfs/extent-tree.c:5199!, which refers to find_free_extent's BUG_ON(index != get_block_group_index(block_group)); In SSD mode, in order to find enough space to alloc, we may check the block_group cache which has been checked sometime before, but the index is not updated, where it hits the BUG_ON. Signed-off-by: Liu Bo Acked-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed