1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (C) 2020 Intel Corporation. 3 * All rights reserved. 4 */ 5 6 #ifndef SPDK_VBDEV_PASSTHRU_H 7 #define SPDK_VBDEV_PASSTHRU_H 8 9 #include "spdk/stdinc.h" 10 11 #include "spdk/bdev.h" 12 #include "spdk/bdev_module.h" 13 14 /** 15 * Create new pass through bdev. 16 * 17 * \param bdev_name Bdev on which pass through vbdev will be created. 18 * \param vbdev_name Name of the pass through bdev. 19 * \return 0 on success, other on failure. 20 */ 21 int bdev_passthru_external_create_disk(const char *bdev_name, const char *vbdev_name); 22 23 /** 24 * Delete passthru bdev. 25 * 26 * \param bdev_name Name of the pass through bdev to delete. 27 * \param cb_fn Function to call after deletion. 28 * \param cb_arg Argument to pass to cb_fn. 29 */ 30 void bdev_passthru_external_delete_disk(const char *bdev_name, spdk_bdev_unregister_cb cb_fn, 31 void *cb_arg); 32 33 #endif /* SPDK_VBDEV_PASSTHRU_H */ 34