aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-10-16 13:53:28 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:57:49 -0500
commit96192499c27e8b58d71f4370f29ca86d4ca915d7 (patch)
treea98cef8c48e407bb20e8166eb2bc3453a3a2d8bd /fs
parentaaedb55bc08f384b7f57dbb3222a511baed4decf (diff)
Btrfs: stop all workers after we free block groups
Stefan was hitting a panic in the async worker stuff because we had outstanding read bios while we were stopping the worker threads. You could reproduce this easily if you mount -o nospace_cache and ran generic/273. This is because the caching thread stuff is still going and we were stopping all the worker threads. We need to stop the workers after this work is done, and the free block groups code will wait for all the caching threads to stop first so we don't run into this problem. With this patch we no longer panic. Thanks, Cc: stable@vger.kernel.org Reported-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 419968e3eaa0..b0ea9f4bbc70 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3637,12 +3637,12 @@ int close_ctree(struct btrfs_root *root)
3637 percpu_counter_sum(&fs_info->delalloc_bytes)); 3637 percpu_counter_sum(&fs_info->delalloc_bytes));
3638 } 3638 }
3639 3639
3640 btrfs_stop_all_workers(fs_info);
3641
3642 del_fs_roots(fs_info); 3640 del_fs_roots(fs_info);
3643 3641
3644 btrfs_free_block_groups(fs_info); 3642 btrfs_free_block_groups(fs_info);
3645 3643
3644 btrfs_stop_all_workers(fs_info);
3645
3646 free_root_pointers(fs_info, 1); 3646 free_root_pointers(fs_info, 1);
3647 3647
3648 iput(fs_info->btree_inode); 3648 iput(fs_info->btree_inode);