numam-spdk/module
Vitaliy Mysak 9f133b1bcc module/ocf: check cache name during recovery from metadata
Save cache device name in metadata section to
check if names agree during auto creation on examine.

This change prevents accidental creation of ocf devices.

Consider example in which vbdev_split is used as cache:
1) bdev_malloc_create -b Malloc0 ...
2) bdev_malloc_create -b Malloc1 ...
3) bdev_nvme_attach_controller -b nvme ...
4) bdev_split_create nvme 2
5) bdev_ocf_create ocf0 wt nvmen1p0 Malloc0
6) bdev_ocf_create ocf1 wt nvmen1p1 Malloc1
7) *shutdown*
8) *startup*
9) bdev_nvme_attach_controller -b nvme
Now ocf0 bdev gets created with cache = nvmen1 (not nvmen1p0)!

This is because nvmen1 and nvmen1p0 have the same metadata.
The result is rather unexpected,
so we would like to verify that cache device
is the one used during creation.
Name is not an ideal way to verify that,
but it should work for most cases.

This change is related to issue #1320

Change-Id: I19ce97163090c5c5b3324eaed90b3134011bb3fb
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1544
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:08:50 +00:00
..
accel make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
bdev module/ocf: check cache name during recovery from metadata 2020-04-10 07:08:50 +00:00
blob make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
blobfs make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
env_dpdk make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
event lib/thread: Add busy count for poller to increment only when some work was done 2020-04-09 13:44:14 +00:00
sock posix: Add the socket into pending_recv list if migrated from another polling group. 2020-04-08 06:43:56 +00:00
Makefile global: rename copy to accel 2020-02-18 08:05:34 +00:00