9f133b1bcc
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> |
||
---|---|---|
.. | ||
accel | ||
bdev | ||
blob | ||
blobfs | ||
env_dpdk | ||
event | ||
sock | ||
Makefile |