1. https://patchwork.kernel.org/patch/2070961/
2. http://choon.net/forum/read.php?21,791943
1:
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d89da40..1e2abda 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2689,6 +2689,7 @@ fail_trans_kthread:
fail_cleaner:
kthread_stop(fs_info-cleaner_kthread);
+fail_block_groups:
/*
* make sure we're done with the btree inode before we stop our
* kthreads
@@ -2696,7 +2697,6 @@ fail_cleaner:
filemap_write_and_wait(fs_info-btree_inode-i_mapping);
invalidate_inode_pages2(fs_info-btree_inode-i_mapping);
-fail_block_groups:
btrfs_free_block_groups(fs_info);
fail_tree_roots:
Just a guess; but I don't know what would have started writes already...
2:
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 9d09a4f..35c3a2a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3909,6 +3909,13 @@ int extent_range_uptodate(struct extent_io_tree *tree,
while (start <= end) {
index = start >> PAGE_CACHE_SHIFT;
page = find_get_page(tree->mapping, index);
+ if (unlikely(!page)) {
+ if (printk_ratelimit())
+ printk(KERN_WARNING
+ "btrfs: NULL page in "
+ "extent_range_uptodate()\n";
+ return 1;
+ }
uptodate = PageUptodate(page);
page_cache_release(page);
if (!uptodate) {