Jens Axboe
b00c53e8f4
blk-mq: fix schedule-while-atomic with scheduler attached
...
We must have dropped the ctx before we call
blk_mq_sched_insert_request() with can_block=true, otherwise we risk
that a flush request can block on insertion if we are currently out of
tags.
[ 47.667190] BUG: scheduling while atomic: jbd2/sda2-8/2089/0x00000002
[ 47.674493] Modules linked in: x86_pkg_temp_thermal btrfs xor zlib_deflate raid6_pq sr_mod cdre
[ 47.690572] Preemption disabled at:
[ 47.690584] [<ffffffff81326c7c>] blk_mq_sched_get_request+0x6c/0x280
[ 47.701764] CPU: 1 PID: 2089 Comm: jbd2/sda2-8 Not tainted 4.11.0-rc7+ #271
[ 47.709630] Hardware name: Dell Inc. PowerEdge T630/0NT78X, BIOS 2.3.4 11/09/2016
[ 47.718081] Call Trace:
[ 47.720903] dump_stack+0x4f/0x73
[ 47.724694] ? blk_mq_sched_get_request+0x6c/0x280
[ 47.730137] __schedule_bug+0x6c/0xc0
[ 47.734314] __schedule+0x559/0x780
[ 47.738302] schedule+0x3b/0x90
[ 47.741899] io_schedule+0x11/0x40
[ 47.745788] blk_mq_get_tag+0x167/0x2a0
[ 47.750162] ? remove_wait_queue+0x70/0x70
[ 47.754901] blk_mq_get_driver_tag+0x92/0xf0
[ 47.759758] blk_mq_sched_insert_request+0x134/0x170
[ 47.765398] ? blk_account_io_start+0xd0/0x270
[ 47.770679] blk_mq_make_request+0x1b2/0x850
[ 47.775766] generic_make_request+0xf7/0x2d0
[ 47.780860] submit_bio+0x5f/0x120
[ 47.784979] ? submit_bio+0x5f/0x120
[ 47.789631] submit_bh_wbc.isra.46+0x10d/0x130
[ 47.794902] submit_bh+0xb/0x10
[ 47.798719] journal_submit_commit_record+0x190/0x210
[ 47.804686] ? _raw_spin_unlock+0x13/0x30
[ 47.809480] jbd2_journal_commit_transaction+0x180a/0x1d00
[ 47.815925] kjournald2+0xb6/0x250
[ 47.820022] ? kjournald2+0xb6/0x250
[ 47.824328] ? remove_wait_queue+0x70/0x70
[ 47.829223] kthread+0x10e/0x140
[ 47.833147] ? commit_timeout+0x10/0x10
[ 47.837742] ? kthread_create_on_node+0x40/0x40
[ 47.843122] ret_from_fork+0x29/0x40
Fixes: a4d907b6a33b ("blk-mq: streamline blk_mq_make_request")
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-04-20 16:42:02 -06:00
..
2017-01-17 09:02:31 -07:00
2016-10-21 15:45:47 -06:00
2017-04-19 08:48:24 -06:00
2017-04-20 08:19:23 -06:00
2017-04-20 09:39:12 -06:00
2017-04-19 08:48:24 -06:00
2016-10-28 08:45:17 -06:00
2017-04-07 09:40:52 -06:00
2017-03-29 11:27:19 -06:00
2017-04-20 12:16:10 -06:00
2017-04-20 12:16:10 -06:00
2017-04-19 10:19:47 -06:00
2017-03-24 20:34:39 -06:00
2017-03-03 10:53:35 -08:00
2017-04-08 11:25:38 -06:00
2017-03-02 08:42:36 +01:00
2017-04-08 11:25:38 -06:00
2016-11-08 17:30:00 -05:00
2017-04-10 16:13:33 -06:00
2017-03-29 11:09:51 -06:00
2017-04-07 12:45:41 -06:00
2017-04-14 14:06:57 -06:00
2017-03-08 09:56:12 -07:00
2017-04-14 14:06:54 -06:00
2017-03-02 08:56:04 -07:00
2017-02-27 20:54:05 +02:00
2017-04-20 16:42:02 -06:00
2017-04-14 14:06:54 -06:00
2017-04-08 11:25:38 -06:00
2017-03-02 08:42:26 +01:00
2017-04-20 15:29:16 -06:00
2017-04-20 15:29:16 -06:00
2017-04-19 08:49:03 -06:00
2017-01-17 10:04:20 -07:00
2017-04-20 09:41:36 -06:00
2017-04-20 12:16:10 -06:00
2017-04-19 08:49:03 -06:00
2017-04-19 08:49:03 -06:00
2017-01-12 07:58:32 -07:00
2017-04-19 17:38:30 -06:00
2015-09-19 18:57:09 -07:00
2017-04-20 12:16:10 -06:00
2017-04-20 12:16:10 -06:00
2017-04-05 08:15:08 -06:00
2014-01-21 20:18:26 -08:00
2017-04-08 11:25:38 -06:00
2017-02-08 13:43:06 -07:00
2017-04-19 08:49:03 -06:00
2017-03-22 20:11:37 -06:00
2017-04-08 11:25:38 -06:00
2017-04-19 17:38:36 -06:00
2017-03-28 08:02:20 -06:00
2017-04-19 08:30:26 -06:00
2017-04-20 15:29:16 -06:00
2017-04-19 08:48:24 -06:00
2017-02-08 13:43:06 -07:00
2017-01-17 10:03:33 -07:00
2017-02-17 12:41:47 -07:00
2017-01-12 07:58:32 -07:00
2017-04-20 12:16:10 -06:00
2017-04-07 14:24:16 -06:00
2017-03-24 20:34:39 -06:00