RIP: 0010:[<ffffffff86d5f628>] [<ffffffff86d5f628>] blk_mq_rq_timed_out+0x18/0xa0 ... Call Trace: [<ffffffff86d5f70c>] blk_mq_check_expired+0x5c/0x60 [<ffffffff86d62be4>] bt_iter+0x54/0x60 [<ffffffff86d635eb>] blk_mq_queue_tag_busy_iter+0x13b/0x320 [<ffffffff86d...
BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0 IP: [<ffffffff86d5f628>] blk_mq_rq_timed_out+0x18/0xa0 PGD 8000000035eae067 PUD 0 Oops: 0000 [#1] SMP CPU: 2 PID: 1041 Comm: kworker/2:1H Kdump: loaded Tainted: P OE --- 3.10.0-1127.19.1.el7.x86_64 #...
laptop_mode_timer_fn, 0);timer_setup(&q->timeout, blk_rq_timed_out_timer, 0);4 changes: 2 additions & 2 deletions 4 block/blk-mq.c Original file line numberDiff line numberDiff line change @@ -519,7 +519,7 @@ void blk_mq_free_request(struct request *rq)ctx...
rq->timeout = 0; @@ -386,14 +386,13 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, WRITE_ONCE(rq->deadline, 0); req_ref_set(rq, 1); if (rq->rq_flags & RQF_ELV) { if (rq->rq_flags & RQF_USE_SCHED) { struct elevator_queue *e = dat...
INIT_WORK(&q->timeout_work, blk_timeout_work); q->request_fn = rfn; q->prep_rq_fn = NULL; q->unprep_rq_fn = NULL; q->queue_flags |= QUEUE_FLAG_DEFAULT; /* Override internal queue lock with supplied lock pointer */
mq_freeze_wq); } staticvoidblk_rq_timed_out_timer(structtimer_list*t) { structrequest_queue*q=from_timer(q,t,timeout); kblockd_schedule_work(&q->timeout_work); } staticvoidblk_timeout_work(structwork_struct*work) { } struct
insert request的路径我们从blk_mq_sched_insert_request开始看, 对于none iosched: spin_lock(&ctx->lock); __blk_mq_insert_request(hctx, rq, at_head); spin_unlock(&ctx->lock); 这里几个点需要注意下: 即使ctx是per-core的, 在insert request的时候依然要拿到ctx->lock, 这里并不是无锁设计的. ...
1、函数是一个可以多次使用的功能代码块,一个封闭的(空间),它可以在代码里随意调用。利用函数的封装...
blk_mq_freeze_queue_wait blk_mq_freeze_queue_wait_timeout blk_mq_init_queue blk_mq_init_sq_queue blk_mq_map_queues blk_mq_pci_map_queues blk_mq_quiesce_queue blk_mq_request_completed blk_mq_requeue_request blk_mq_rq_cpu blk_mq_run_hw_queues blk_mq_start_request ...
> The bug is that the sg_io issued to scsi_blk_mq would succeed even if > LLD wants to error out those requests. > > Let me explain the scenario in more details. > > Setup: > 0. Host kernel configuration > - 4.19.9, 4.20.16 ...