c899854d03
When an SPDK application shuts down, the bdev layer will automatically unregister all of the bdevs to ensure they are properly quiesced and cleaned up. Some modules may want to perform different operations when a bdev is destructed during normal runtime vs. shutdown. For example, for lvol, when the last lvol is cleaned up, it should unload the lvolstore, release and close the bdev that contains the lvolstore. You never want to do this during normal runtime though - it is perfectly valid to have an lvolstore that contains no lvols. RAID and future bdev modules such as multipath have similar use cases. So add a new bdev module callback named "fini_start". If a module specifies a function pointer for this callback, the bdev layer will call it before it starts the bdev unregistrations. This enables some future patches to the bdev layer such that it will always unregister block devices that are not claimed (i.e. logical volumes) before block devices that are claimed (i.e. the bdev containing an lvolstore). Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I6e87f5c2b27f16731ea5def858f26e882a29495a Reviewed-on: https://review.gerrithub.io/421175 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
||
---|---|---|
.. | ||
app | ||
bdev | ||
blobfs | ||
blobstore | ||
common | ||
cpp_headers | ||
env | ||
event | ||
ioat | ||
iscsi_tgt | ||
json_config | ||
lvol | ||
nvme | ||
nvmf | ||
pmem | ||
spdkcli | ||
unit | ||
vhost | ||
Makefile | ||
spdk_cunit.h |