Spdk/module/bdev
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
..
aio make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
compress bdev/compress: Cleanup vbdev_reduce_load_cb() by code reordering 2020-04-03 06:31:10 +00:00
crypto make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
delay make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
error make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
ftl make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
gpt make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
iscsi make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
lvol make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
malloc make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
null make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
nvme bdev_nvme: don't register multiple ctrlr destruct pollers. 2020-04-06 07:48:13 +00:00
ocf module/ocf: check cache name during recovery from metadata 2020-04-10 07:08:50 +00:00
passthru make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
pmem make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
raid make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
rbd make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
rpc make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
split make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
uring make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
virtio make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
zone_block make: rev SO versions individually for libraries. 2020-03-18 08:02:30 +00:00
Makefile bdev/ftl: Remove NVMe dependencies 2020-01-15 12:24:44 +00:00