UPSTREAM: block: track disk DEAD state automatically for modeling queue freeze lockdep
Now we only verify the outmost freeze & unfreeze in current context in case that !q->mq_freeze_depth, so it is reliable to save disk DEAD state when we want to lock the freeze queue since the state is one per-task variable now. Doing this way can kill lots of false positive when freeze queue is called before adding disk[1]. [1] https://lore.kernel.org/linux-block/6741f6b2.050a0220.1cc393.0017.GAE@google.com/ Change-Id: I1b0331f5863865d05ac2d719cd314addfed23838 Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241127135133.3952153-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Bug: 415836627 (cherry picked from commit 6f491a8d4b92d1a840fd9209cba783c84437d0b7) Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
+2
-2
@@ -602,14 +602,14 @@ void elevator_init_mq(struct request_queue *q)
|
||||
* Disk isn't added yet, so verifying queue lock only manually.
|
||||
*/
|
||||
blk_freeze_queue_start_non_owner(q);
|
||||
blk_freeze_acquire_lock(q, true, false);
|
||||
blk_freeze_acquire_lock(q, false);
|
||||
blk_mq_freeze_queue_wait(q);
|
||||
|
||||
blk_mq_cancel_work_sync(q);
|
||||
|
||||
err = blk_mq_init_sched(q, e);
|
||||
|
||||
blk_unfreeze_release_lock(q, true, false);
|
||||
blk_unfreeze_release_lock(q, false);
|
||||
blk_mq_unfreeze_queue_non_owner(q);
|
||||
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user