Commit 4981158
block: move elevator queue allocation logic into blk_mq_init_sched
In preparation for allocating sched_tags before freezing the request
queue and acquiring ->elevator_lock, move the elevator queue allocation
logic from the elevator ops ->init_sched callback into blk_mq_init_sched.
As elevator_alloc is now only invoked from block layer core, we don't
need to export it, so unexport elevator_alloc function.
This refactoring provides a centralized location for elevator queue
initialization, which makes it easier to store pre-allocated sched_tags
in the struct elevator_queue during later changes.
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nilay Shroff <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 5421681 commit 4981158
File tree
6 files changed
+16
-36
lines changed- block
6 files changed
+16
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7218 | 7218 | | |
7219 | 7219 | | |
7220 | 7220 | | |
7221 | | - | |
| 7221 | + | |
7222 | 7222 | | |
7223 | 7223 | | |
7224 | | - | |
7225 | 7224 | | |
7226 | 7225 | | |
7227 | 7226 | | |
7228 | | - | |
7229 | | - | |
7230 | | - | |
7231 | | - | |
7232 | 7227 | | |
7233 | | - | |
7234 | | - | |
| 7228 | + | |
7235 | 7229 | | |
7236 | | - | |
| 7230 | + | |
7237 | 7231 | | |
7238 | 7232 | | |
7239 | 7233 | | |
| |||
7391 | 7385 | | |
7392 | 7386 | | |
7393 | 7387 | | |
7394 | | - | |
7395 | 7388 | | |
7396 | 7389 | | |
7397 | 7390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
481 | | - | |
| 485 | + | |
482 | 486 | | |
483 | 487 | | |
484 | 488 | | |
| |||
487 | 491 | | |
488 | 492 | | |
489 | 493 | | |
490 | | - | |
| 494 | + | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
| |||
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
511 | | - | |
| 515 | + | |
| 516 | + | |
512 | 517 | | |
513 | 518 | | |
514 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | 408 | | |
414 | 409 | | |
415 | | - | |
416 | | - | |
| 410 | + | |
417 | 411 | | |
418 | | - | |
419 | 412 | | |
420 | 413 | | |
421 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
575 | 574 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | 575 | | |
582 | 576 | | |
583 | 577 | | |
584 | | - | |
| 578 | + | |
585 | 579 | | |
586 | 580 | | |
587 | 581 | | |
| |||
608 | 602 | | |
609 | 603 | | |
610 | 604 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | 605 | | |
616 | 606 | | |
617 | 607 | | |
| |||
0 commit comments