Commit 245618f
block: protect wbt_lat_usec using q->elevator_lock
The wbt latency and state could be updated while initializing the
elevator or exiting the elevator. It could be also updated while
configuring IO latency QoS parameters using cgroup. The elevator
code path is now protected with q->elevator_lock. So we should
protect the access to sysfs attribute wbt_lat_usec using q->elevator
_lock instead of q->sysfs_lock. White we're at it, also protect
ioc_qos_write(), which configures wbt parameters via cgroup, using
q->elevator_lock.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Link: https://lore.kernel.org/r/20250304102551.2533767-7-nilay@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 3efe757 commit 245618f
3 files changed
Lines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3248 | 3248 | | |
3249 | 3249 | | |
3250 | 3250 | | |
| 3251 | + | |
3251 | 3252 | | |
3252 | 3253 | | |
3253 | 3254 | | |
| |||
3355 | 3356 | | |
3356 | 3357 | | |
3357 | 3358 | | |
| 3359 | + | |
3358 | 3360 | | |
3359 | 3361 | | |
3360 | 3362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | 592 | | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
622 | 623 | | |
623 | | - | |
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | 692 | | |
699 | 693 | | |
700 | 694 | | |
701 | 695 | | |
702 | 696 | | |
703 | 697 | | |
704 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
705 | 701 | | |
706 | 702 | | |
707 | 703 | | |
| |||
882 | 878 | | |
883 | 879 | | |
884 | 880 | | |
| 881 | + | |
885 | 882 | | |
886 | 883 | | |
887 | 884 | | |
888 | | - | |
889 | 885 | | |
890 | 886 | | |
891 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
| 566 | + | |
| 567 | + | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| |||
0 commit comments