[PATCH v3 3/3] nvme-rdma: Handle number of queue changes
Chao Leng
lengchao at huawei.com
Mon Aug 29 06:16:32 PDT 2022
On 2022/8/29 17:32, Daniel Wagner wrote:
> On Mon, Aug 29, 2022 at 05:22:50PM +0800, Chao Leng wrote:
>>> + ret = nvme_rdma_start_io_queues(ctrl, nr_queues,
>>> + ctrl->tag_set.nr_hw_queues + 1);
>>> + if (ret)
>>> + goto out_wait_freeze_timed_out;
>> nvme_rdma_start_io_queues(ctrl, 1, nr_queues) need to clean.
>
> the teardown path in nvme_rdma_stop_io_queus() is using
>
> test_and_clear_bit(NVME_RDMA_Q_LIVE, &queue->flags)
>
> when iterating over all nr_hw_queues.
I mean that we need realloc the ctrl->queues for
nvme_rdma_start_io_queues(ctrl, 1, nr_queues).
Otherwise, unallocated memory will be accessed when
the new queue_count is bigger than the old one.
> .
>
More information about the Linux-nvme
mailing list