xref: /spdk/module/bdev/passthru/vbdev_passthru.h (revision 7809cb41241d4b7dd9b2deb6d8318f984129dbfb)
1488570ebSJim Harris /*   SPDX-License-Identifier: BSD-3-Clause
2a6dbe372Spaul luse  *   Copyright (C) 2018 Intel Corporation.
307fe6a43SSeth Howell  *   All rights reserved.
407fe6a43SSeth Howell  */
507fe6a43SSeth Howell 
607fe6a43SSeth Howell #ifndef SPDK_VBDEV_PASSTHRU_H
707fe6a43SSeth Howell #define SPDK_VBDEV_PASSTHRU_H
807fe6a43SSeth Howell 
907fe6a43SSeth Howell #include "spdk/stdinc.h"
1007fe6a43SSeth Howell 
1107fe6a43SSeth Howell #include "spdk/bdev.h"
1207fe6a43SSeth Howell #include "spdk/bdev_module.h"
1307fe6a43SSeth Howell 
1407fe6a43SSeth Howell /**
1507fe6a43SSeth Howell  * Create new pass through bdev.
1607fe6a43SSeth Howell  *
1707fe6a43SSeth Howell  * \param bdev_name Bdev on which pass through vbdev will be created.
1807fe6a43SSeth Howell  * \param vbdev_name Name of the pass through bdev.
19*7809cb41SArtur Paszkiewicz  * \param uuid Optional UUID to assign to the pass through bdev.
2007fe6a43SSeth Howell  * \return 0 on success, other on failure.
2107fe6a43SSeth Howell  */
22*7809cb41SArtur Paszkiewicz int bdev_passthru_create_disk(const char *bdev_name, const char *vbdev_name,
23*7809cb41SArtur Paszkiewicz 			      const struct spdk_uuid *uuid);
2407fe6a43SSeth Howell 
2507fe6a43SSeth Howell /**
2607fe6a43SSeth Howell  * Delete passthru bdev.
2707fe6a43SSeth Howell  *
284573e4ccSShuhei Matsumoto  * \param bdev_name Name of the pass through bdev.
2907fe6a43SSeth Howell  * \param cb_fn Function to call after deletion.
3007fe6a43SSeth Howell  * \param cb_arg Argument to pass to cb_fn.
3107fe6a43SSeth Howell  */
324573e4ccSShuhei Matsumoto void bdev_passthru_delete_disk(const char *bdev_name, spdk_bdev_unregister_cb cb_fn,
3307fe6a43SSeth Howell 			       void *cb_arg);
3407fe6a43SSeth Howell 
3507fe6a43SSeth Howell #endif /* SPDK_VBDEV_PASSTHRU_H */
36