nvme/opal: use secure erase API again
Commit 8c1d107
added a new erase API and renamed the original
API with "secure_" prefix according to the specification, as the
secure one will not cryptographically erase user data, due to
the limitation from the drive, only the secure API can be
supported, so changing the caller to use the original again.
Change-Id: I25cb054e728065d9ae9c6c30aa0ab374d60cf6f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
0bf189a39d
commit
ebb01092a3
@ -1515,7 +1515,8 @@ opal_erase_locking_range(struct dev *iter)
|
||||
return;
|
||||
}
|
||||
printf("\n...\n");
|
||||
ret = spdk_opal_cmd_erase_locking_range(iter->opal_dev, OPAL_ADMIN1, locking_range_id, passwd_p);
|
||||
ret = spdk_opal_cmd_secure_erase_locking_range(iter->opal_dev, OPAL_ADMIN1, locking_range_id,
|
||||
passwd_p);
|
||||
if (ret) {
|
||||
printf("Erase locking range failure: %d\n", ret);
|
||||
spdk_opal_dev_destruct(iter->opal_dev);
|
||||
|
@ -526,8 +526,8 @@ spdk_vbdev_opal_destruct(const char *bdev_name, const char *password)
|
||||
}
|
||||
|
||||
/* secure erase locking range */
|
||||
rc = spdk_opal_cmd_erase_locking_range(nvme_ctrlr->opal_dev, OPAL_ADMIN1, locking_range_id,
|
||||
password);
|
||||
rc = spdk_opal_cmd_secure_erase_locking_range(nvme_ctrlr->opal_dev, OPAL_ADMIN1, locking_range_id,
|
||||
password);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("opal erase locking range failed\n");
|
||||
goto err;
|
||||
|
Loading…
Reference in New Issue
Block a user