1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) Intel Corporation. 3 * All rights reserved. 4 */ 5 #ifndef SPDK_VBDEV_OPAL_H 6 #define SPDK_VBDEV_OPAL_H 7 8 #include "spdk/bdev_module.h" 9 #include "bdev_nvme.h" 10 11 int vbdev_opal_create(const char *nvme_ctrlr_name, uint32_t nsid, uint8_t locking_range_id, 12 uint64_t range_start, uint64_t range_length, const char *password); 13 14 struct spdk_opal_locking_range_info *vbdev_opal_get_info_from_bdev(const char *opal_bdev_name, 15 const char *password); 16 17 int vbdev_opal_destruct(const char *bdev_name, const char *password); 18 19 int vbdev_opal_enable_new_user(const char *bdev_name, const char *admin_password, 20 uint16_t user_id, const char *user_password); 21 22 int vbdev_opal_set_lock_state(const char *bdev_name, uint16_t user_id, const char *password, 23 const char *lock_state); 24 25 #endif 26