Spdk/test/unit/lib/bdev
GangCao 7bcd316de1 bdev: abort all IOs when unregistering the bdev
To fix issue: #2484

When unregistering the bdev, will send out the message
to each thread to abort all the IOs including IOs from
nomem_io queue, need_buf_small queue and need_buf_large queue.

The new SPDK_BDEV_STATUS_UNREGISTERING state is newly
added to indicate this unregister operation.

In this case, the bdev unregister operation becomes the
async operation as each thread will be sent the message
to abort the IOs and as the last step, it will unregister
the required bdev and associted io device.

On the other hand, the queued_resets will be handled
separately and not aborted in the bdev unregister.

New unit test cases are also added:
  enomem_multi_bdev_unregister: to abort the IO from
nomem_io queue during the unregister operation
  bdev_open_ext_unregister: to handle the events and
async operations from the unregister operation

Change-Id: Ib1663c0f71ffe87144869cb3a684e18eb956046b
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12573
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-05-18 07:30:00 +00:00
..
bdev_zone.c spelling: test 2021-12-03 08:13:22 +00:00
bdev.c bdev: abort all IOs when unregistering the bdev 2022-05-18 07:30:00 +00:00
compress.c bdev/compress: Verify mbuf chain if the driver doesn't suppot SGL 2022-03-31 09:34:52 +00:00
crypto.c module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
gpt test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
mt bdev: abort all IOs when unregistering the bdev 2022-05-18 07:30:00 +00:00
nvme bdev/nvme: Disable automatic failback in multipath mode 2022-05-17 12:54:45 +00:00
part.c bdev: pull/push data if bdev doesn't support 2022-04-04 09:57:56 +00:00
pmem module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
raid bdev/raid: Add concat module 2022-04-05 07:39:00 +00:00
scsi_nvme.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
vbdev_lvol.c vbdev_lvol: Report memory domains 2022-05-16 10:14:26 +00:00
vbdev_zone_block.c module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
Makefile ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00