]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure there are not any read requests before stopping workers
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Wed, 9 Apr 2014 11:23:22 +0000 (19:23 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:43 +0000 (17:20 -0700)
commit27343bf467be77840d3ffc150eb09c9ffea814ea
tree2fd516cb693fbdced5c840a38bc85baecd740e41
parent9f668021e0c76df7e1496a8367fb96a4405fd8f1
Btrfs: make sure there are not any read requests before stopping workers

In close_ctree(), after we have stopped all workers,there maybe still
some read requests(for example readahead) to submit and this *maybe* trigger
an oops that user reported before:

kernel BUG at fs/btrfs/async-thread.c:619!

By hacking codes, i can reproduce this problem with one cpu available.
We fix this potential problem by invalidating all btree inode pages before
stopping all workers.

Thanks to Miao for pointing out this problem.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/disk-io.c