aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorMiao Xie <[email protected]>2013-02-07 06:01:35 +0000
committerJosef Bacik <[email protected]>2013-02-20 12:59:40 -0500
commit2b8195bb5717729e4e94ab4ad73a543feaafb0a2 (patch)
treed4b369f7e7dcf35b6023282d8fdac001f67cb847 /tools/perf/util/trace-event-scripting.c
parentcb95e7bf7ba481c3d35b238b1cd671b63f54238a (diff)
Btrfs: fix the race between bio and btrfs_stop_workers
open_ctree() need read the metadata to initialize the global information of btrfs. But it may fail after it submit some bio, and then it will jump to the error path. Unfortunately, it doesn't check if there are some bios in flight, and just stop all the worker threads. As a result, when the submitted bios end, they can not find any worker thread which can deal with subsequent work, then oops happen. kernel BUG at fs/btrfs/async-thread.c:605! Fix this problem by invoking invalidate_inode_pages2() before we stop the worker threads. This function will wait until the bio end because it need lock the pages which are going to be invalidated, and if a page is under disk read IO, it must be locked. invalidate_inode_pages2() need wait until end bio handler to unlocked it. Reported-and-Tested-by: Tsutomu Itoh <[email protected]> Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions