Commit 12fa57b
Ming Lei
blk-mq: Move flush queue allocation into blk_mq_init_hctx()
JIRA: https://issues.redhat.com/browse/RHEL-120078
commit aba19ee
Author: Ming Lei <ming.lei@redhat.com>
Date: Sat Aug 30 10:18:19 2025 +0800
blk-mq: Move flush queue allocation into blk_mq_init_hctx()
Move flush queue allocation into blk_mq_init_hctx() and its release into
blk_mq_exit_hctx(), and prepare for replacing tags->lock with SRCU to
draining inflight request walking. blk_mq_exit_hctx() is the last chance
for us to get valid `tag_set` reference, and we need to add one SRCU to
`tag_set` for freeing flush request via call_srcu().
It is safe to move flush queue & request release into blk_mq_exit_hctx(),
because blk_mq_clear_flush_rq_mapping() clears the flush request
reference int driver tags inflight request table, meantime inflight
request walking is drained.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ming Lei <ming.lei@redhat.com>1 parent 9e4302f commit 12fa57b
2 files changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3935 | 3935 | | |
3936 | 3936 | | |
3937 | 3937 | | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
3938 | 3941 | | |
3939 | 3942 | | |
3940 | 3943 | | |
| |||
3960 | 3963 | | |
3961 | 3964 | | |
3962 | 3965 | | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
3963 | 3972 | | |
3964 | 3973 | | |
3965 | 3974 | | |
3966 | 3975 | | |
3967 | 3976 | | |
3968 | 3977 | | |
3969 | | - | |
| 3978 | + | |
3970 | 3979 | | |
3971 | 3980 | | |
3972 | 3981 | | |
| |||
3983 | 3992 | | |
3984 | 3993 | | |
3985 | 3994 | | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
3986 | 3998 | | |
3987 | 3999 | | |
3988 | 4000 | | |
| |||
4034 | 4046 | | |
4035 | 4047 | | |
4036 | 4048 | | |
4037 | | - | |
4038 | | - | |
4039 | | - | |
4040 | | - | |
4041 | 4049 | | |
4042 | 4050 | | |
4043 | 4051 | | |
4044 | 4052 | | |
4045 | | - | |
4046 | | - | |
4047 | 4053 | | |
4048 | 4054 | | |
4049 | 4055 | | |
| |||
0 commit comments