[3.11.y.z extended stable] Patch "Btrfs: make sure there are not any read requests before stopping workers" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Jul 10 11:17:41 UTC 2014
This is a note to let you know that I have just added a patch titled
Btrfs: make sure there are not any read requests before stopping workers
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 4dae19b5f90318a700ffa9adf83dcbd509e06f02 Mon Sep 17 00:00:00 2001
From: Wang Shilong <wangsl.fnst at cn.fujitsu.com>
Date: Wed, 9 Apr 2014 19:23:22 +0800
Subject: Btrfs: make sure there are not any read requests before stopping
workers
commit de348ee022175401e77d7662b7ca6e231a94e3fd upstream.
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 at cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba at suse.cz>
Signed-off-by: Chris Mason <clm at fb.com>
Cc: David Sterba <dsterba at suse.cz>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/btrfs/disk-io.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3ce443662607..9001c263bc79 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3554,6 +3554,11 @@ int close_ctree(struct btrfs_root *root)
btrfs_free_block_groups(fs_info);
+ /*
+ * we must make sure there is not any read request to
+ * submit after we stopping all workers.
+ */
+ invalidate_inode_pages2(fs_info->btree_inode->i_mapping);
btrfs_stop_all_workers(fs_info);
del_fs_roots(fs_info);
--
1.9.1
More information about the kernel-team
mailing list