OpenCloudOS-Kernel/drivers/nvme/target
Daniel Wagner 0f5be6a4ff nvmet: update AEN list and array at one place
All async events are enqueued via nvmet_add_async_event() which
updates the ctrl->async_event_cmds[] array and additionally an struct
nvmet_async_event is added to the ctrl->async_events list.

Under normal operations the nvmet_async_event_work() updates again
the ctrl->async_event_cmds and removes the corresponding struct
nvmet_async_event from the list again. Though nvmet_sq_destroy() could
be called which calls nvmet_async_events_free() which only updates the
ctrl->async_event_cmds[] array.

Add new functions nvmet_async_events_process() and
nvmet_async_events_free() to process async events, update an array and
the list.

When we destroy submission queue after clearing the aen present on
the ctrl->async list we also loop over ctrl->async_event_cmds[] for
any requests posted by the host for which we don't have the AEN in
the ctrl->async_events list by calling nvmet_async_event_process()
and nvmet_async_events_free().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
[chaitanya.kulkarni@wdc.com
 * Loop over and clear out outstanding requests
 * Update changelog
]
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-02-05 01:56:10 +09:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00
admin-cmd.c nvmet: fix per feat data len for get_feature 2020-01-10 08:55:50 -07:00
configfs.c nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
core.c nvmet: update AEN list and array at one place 2020-02-05 01:56:10 +09:00
discovery.c nvmet: fill discovery controller sn, fr and mn correctly 2019-11-04 10:56:42 -07:00
fabrics-cmd.c nvmet: Fix controller use after free 2020-02-05 01:13:09 +09:00
fc.c nvmet: Open code nvmet_req_execute() 2019-11-04 10:56:42 -07:00
fcloop.c nvme_fc: add module to ops template to allow module references 2019-11-27 02:48:27 +09:00
io-cmd-bdev.c nvmet: fix dsm failure when payload does not match sgl descriptor 2020-02-04 03:00:24 +09:00
io-cmd-file.c nvmet: fix dsm failure when payload does not match sgl descriptor 2020-02-04 03:00:24 +09:00
loop.c nvmet-loop: Avoid preallocating big SGL for data 2019-11-27 02:14:19 +09:00
nvmet.h nvmet: fix dsm failure when payload does not match sgl descriptor 2020-02-04 03:00:24 +09:00
rdma.c nvmet: Open code nvmet_req_execute() 2019-11-04 10:56:42 -07:00
tcp.c nvmet: Open code nvmet_req_execute() 2019-11-04 10:56:42 -07:00
trace.c nvmet: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00