2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2019-09-20 09:36:22 +00:00
|
|
|
* Copyright (c) Intel Corporation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
#ifndef SPDK_VBDEV_OPAL_H
|
|
|
|
#define SPDK_VBDEV_OPAL_H
|
|
|
|
|
|
|
|
#include "spdk/bdev_module.h"
|
|
|
|
#include "bdev_nvme.h"
|
|
|
|
|
2020-05-10 07:46:07 +00:00
|
|
|
int vbdev_opal_create(const char *nvme_ctrlr_name, uint32_t nsid, uint8_t locking_range_id,
|
|
|
|
uint64_t range_start, uint64_t range_length, const char *password);
|
2019-09-20 09:36:22 +00:00
|
|
|
|
2020-05-10 07:46:07 +00:00
|
|
|
struct spdk_opal_locking_range_info *vbdev_opal_get_info_from_bdev(const char *opal_bdev_name,
|
2019-10-23 13:29:17 +00:00
|
|
|
const char *password);
|
|
|
|
|
2020-05-10 07:46:07 +00:00
|
|
|
int vbdev_opal_destruct(const char *bdev_name, const char *password);
|
2019-09-20 09:36:22 +00:00
|
|
|
|
2020-05-10 07:46:07 +00:00
|
|
|
int vbdev_opal_enable_new_user(const char *bdev_name, const char *admin_password,
|
|
|
|
uint16_t user_id, const char *user_password);
|
2019-10-09 11:55:46 +00:00
|
|
|
|
2020-05-10 07:46:07 +00:00
|
|
|
int vbdev_opal_set_lock_state(const char *bdev_name, uint16_t user_id, const char *password,
|
|
|
|
const char *lock_state);
|
2019-10-09 11:55:46 +00:00
|
|
|
|
2019-09-20 09:36:22 +00:00
|
|
|
#endif
|