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