Spdk/module/bdev/passthru/vbdev_passthru.h
Artur Paszkiewicz ff9d703946 module/passthru: add uuid option for creating passthru bdev
Change-Id: I1a298161018553feea00248568f2ea786a08ff64
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2023-05-09 17:58:11 +08:00

36 lines
976 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (C) 2018 Intel Corporation.
* All rights reserved.
*/
#ifndef SPDK_VBDEV_PASSTHRU_H
#define SPDK_VBDEV_PASSTHRU_H
#include "spdk/stdinc.h"
#include "spdk/bdev.h"
#include "spdk/bdev_module.h"
/**
* Create new pass through bdev.
*
* \param bdev_name Bdev on which pass through vbdev will be created.
* \param vbdev_name Name of the pass through bdev.
* \param uuid Optional UUID to assign to the pass through bdev.
* \return 0 on success, other on failure.
*/
int bdev_passthru_create_disk(const char *bdev_name, const char *vbdev_name,
const struct spdk_uuid *uuid);
/**
* Delete passthru bdev.
*
* \param bdev_name Name of the pass through bdev.
* \param cb_fn Function to call after deletion.
* \param cb_arg Argument to pass to cb_fn.
*/
void bdev_passthru_delete_disk(const char *bdev_name, spdk_bdev_unregister_cb cb_fn,
void *cb_arg);
#endif /* SPDK_VBDEV_PASSTHRU_H */