Commit ae446a0
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 <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>1 parent 8ab9be5 commit ae446a0
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 | |
|---|---|---|---|
| |||
7232 | 7232 | | |
7233 | 7233 | | |
7234 | 7234 | | |
7235 | | - | |
| 7235 | + | |
7236 | 7236 | | |
7237 | 7237 | | |
7238 | | - | |
7239 | 7238 | | |
7240 | 7239 | | |
7241 | 7240 | | |
7242 | | - | |
7243 | | - | |
7244 | | - | |
7245 | | - | |
7246 | 7241 | | |
7247 | | - | |
7248 | | - | |
| 7242 | + | |
7249 | 7243 | | |
7250 | | - | |
| 7244 | + | |
7251 | 7245 | | |
7252 | 7246 | | |
7253 | 7247 | | |
| |||
7405 | 7399 | | |
7406 | 7400 | | |
7407 | 7401 | | |
7408 | | - | |
7409 | 7402 | | |
7410 | 7403 | | |
7411 | 7404 | | |
| |||
| 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