Commit aba19ee
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>1 parent ba28afb commit aba19ee
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 | |
|---|---|---|---|
| |||
3939 | 3939 | | |
3940 | 3940 | | |
3941 | 3941 | | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
3942 | 3945 | | |
3943 | 3946 | | |
3944 | 3947 | | |
| |||
3964 | 3967 | | |
3965 | 3968 | | |
3966 | 3969 | | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
3967 | 3976 | | |
3968 | 3977 | | |
3969 | 3978 | | |
3970 | 3979 | | |
3971 | 3980 | | |
3972 | 3981 | | |
3973 | | - | |
| 3982 | + | |
3974 | 3983 | | |
3975 | 3984 | | |
3976 | 3985 | | |
| |||
3987 | 3996 | | |
3988 | 3997 | | |
3989 | 3998 | | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
3990 | 4002 | | |
3991 | 4003 | | |
3992 | 4004 | | |
| |||
4038 | 4050 | | |
4039 | 4051 | | |
4040 | 4052 | | |
4041 | | - | |
4042 | | - | |
4043 | | - | |
4044 | | - | |
4045 | 4053 | | |
4046 | 4054 | | |
4047 | 4055 | | |
4048 | 4056 | | |
4049 | | - | |
4050 | | - | |
4051 | 4057 | | |
4052 | 4058 | | |
4053 | 4059 | | |
| |||
0 commit comments