numam-spdk/test
Jim Harris c899854d03 bdev: add new fini_start notification callback for modules
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>
2018-08-15 23:32:04 +00:00
..
app app: allow full-name command line options 2018-08-13 17:30:10 +00:00
bdev bdevio: parse all available cmdline options 2018-08-13 17:30:10 +00:00
blobfs app: allow full-name command line options 2018-08-13 17:30:10 +00:00
blobstore autotest_common.sh: move to test/common 2018-02-27 20:37:27 -05:00
common test/iscsi: Add installation of socat in vm_setup.sh configuration 2018-08-15 18:09:46 +00:00
cpp_headers build: add @: to remaining 'all' targets 2018-02-14 17:38:25 -05:00
env test/vtophys: reduce amount of memory requested 2018-07-26 05:28:52 +00:00
event test/event_perf: use less memory 2018-07-26 05:28:52 +00:00
ioat ioat: remove ioat kperf kernel driver test harness 2018-04-30 17:11:53 +00:00
iscsi_tgt autotest: add unmap,flush,reset testing for iscsi initiator. 2018-08-15 17:36:40 +00:00
json_config app: drop -w parameter (wait for rpc init) 2018-08-13 17:30:10 +00:00
lvol test: refactor the run_test function to add detailed information 2018-08-15 17:24:01 +00:00
nvme test/nvme/reset: exit the test if no controllers avaiable 2018-08-06 23:38:48 +00:00
nvmf test: refactor the run_test function to add detailed information 2018-08-15 17:24:01 +00:00
pmem test/json: Add pmem bdev test 2018-07-05 19:09:56 +00:00
spdkcli test/spdkcli: Fix: Add missing delete_*_bdev methods 2018-07-27 16:48:02 +00:00
unit bdev: add new fini_start notification callback for modules 2018-08-15 23:32:04 +00:00
vhost test: refactor the run_test function to add detailed information 2018-08-15 17:24:01 +00:00
Makefile test: move lib/json up to test app directory 2018-03-29 00:31:24 -04:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00