Commit ebb01092 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvme/opal: use secure erase API again



Commit 8c1d1074 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: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1519


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 0bf189a3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@ 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,
	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");