[PATCH V2] nvme: free pre-allocated queue if create ioq goes wrong
Minwoo Im
minwoo.im.dev at gmail.com
Wed Jan 17 07:00:31 PST 2018
On Mon, Jan 15, 2018 at 11:00 AM, Keith Busch <keith.busch at intel.com> wrote:
> Unless this is the very first pass at initialisation, I don't think we
> can free queues until after blk_mq_update_nr_hw_queues since the hctx
> could otherwise point to freed memory.
If not in the first initial step, if (_online_queues_ < 2) driver will
kill queues and
remove namespaces. I thought this "killing queue" will handle what you concerned
about. If I misunderstand what it is, please let me know.
Otherwise if (_online_queues_ >= 2) which means that
at least one or more IO queue is prepared, blk_mq_update_nr_hw_queues()
will be triggered as you said.
More information about the Linux-nvme
mailing list