Operations on a FUSE fsdev dispatcher. More...
Typedefs | |
typedef void(* | spdk_fuse_dispatcher_create_cpl_cb) (void *cb_arg, struct spdk_fuse_dispatcher *disp) |
FUSE fsdev dispatcher create completion callback. | |
typedef void(* | spdk_fuse_dispatcher_submit_cpl_cb) (void *cb_arg, int error) |
FUSE fsdev dispatcher submit completion callback. | |
typedef void(* | spdk_fuse_dispatcher_delete_cpl_cb) (void *cb_arg, int error) |
FUSE fsdev dispatcher delete completion callback. | |
typedef void(* | spdk_fuse_dispatcher_event_cb) (enum spdk_fuse_dispatcher_event_type type, struct spdk_fuse_dispatcher *disp, void *event_ctx) |
FUSE fsdev dispatcher event callback. | |
Enumerations | |
enum | spdk_fuse_arch { SPDK_FUSE_ARCH_NATIVE , SPDK_FUSE_ARCH_X86 , SPDK_FUSE_ARCH_X86_64 , SPDK_FUSE_ARCH_ARM , SPDK_FUSE_ARCH_ARM64 , _SPDK_FUSE_ARCH_LAST } |
enum | spdk_fuse_dispatcher_event_type { SPDK_FUSE_DISP_EVENT_FSDEV_REMOVE } |
Asynchronous event type. | |
Functions | |
int | spdk_fuse_dispatcher_create (const char *fsdev_name, spdk_fuse_dispatcher_event_cb event_cb, void *event_ctx, spdk_fuse_dispatcher_create_cpl_cb cb, void *cb_arg) |
Create a FUSE fsdev dispatcher. | |
int | spdk_fuse_dispatcher_set_arch (struct spdk_fuse_dispatcher *disp, enum spdk_fuse_arch fuse_arch) |
Set a FUSE request source's HW architecture. | |
const char * | spdk_fuse_dispatcher_get_fsdev_name (struct spdk_fuse_dispatcher *disp) |
Get underlying fsdev name. | |
struct spdk_io_channel * | spdk_fuse_dispatcher_get_io_channel (struct spdk_fuse_dispatcher *disp) |
Obtain an I/O channel for the FUSE fsdev dispatcher object. | |
int | spdk_fuse_dispatcher_submit_request (struct spdk_fuse_dispatcher *disp, struct spdk_io_channel *ch, struct iovec *in_iov, int in_iovcnt, struct iovec *out_iov, int out_iovcnt, spdk_fuse_dispatcher_submit_cpl_cb cb, void *cb_arg) |
Submit FUSE request. | |
int | spdk_fuse_dispatcher_delete (struct spdk_fuse_dispatcher *disp, spdk_fuse_dispatcher_delete_cpl_cb cb, void *cb_arg) |
Delete a FUSE fsdev dispatcher. | |
Operations on a FUSE fsdev dispatcher.
typedef void(* spdk_fuse_dispatcher_create_cpl_cb) (void *cb_arg, struct spdk_fuse_dispatcher *disp) |
FUSE fsdev dispatcher create completion callback.
cb_arg | Callback argument specified upon create operation. |
disp | FUSE fsdev dispatcher object. NULL if creation failed. |
typedef void(* spdk_fuse_dispatcher_delete_cpl_cb) (void *cb_arg, int error) |
FUSE fsdev dispatcher delete completion callback.
cb_arg | Callback argument specified upon delete operation. |
error | 0 if the operation succeeded, a negative error code otherwise. |
typedef void(* spdk_fuse_dispatcher_event_cb) (enum spdk_fuse_dispatcher_event_type type, struct spdk_fuse_dispatcher *disp, void *event_ctx) |
FUSE fsdev dispatcher event callback.
type | Event type. |
disp | FUSE fsdev dispatcher object. |
event_ctx | Context for the filesystem device event. |
typedef void(* spdk_fuse_dispatcher_submit_cpl_cb) (void *cb_arg, int error) |
FUSE fsdev dispatcher submit completion callback.
cb_arg | Callback argument specified upon submit operation. |
error | 0 if the operation succeeded, a negative error code otherwise. |
int spdk_fuse_dispatcher_create | ( | const char * | fsdev_name, |
spdk_fuse_dispatcher_event_cb | event_cb, | ||
void * | event_ctx, | ||
spdk_fuse_dispatcher_create_cpl_cb | cb, | ||
void * | cb_arg ) |
Create a FUSE fsdev dispatcher.
fsdev_name | Name of the fsdev to work with. |
event_cb | Dispatcher event callback. |
event_ctx | Dispatcher event callback's context. |
cb | Completion callback. |
cb_arg | Context to be passed to the completion callback. |
int spdk_fuse_dispatcher_delete | ( | struct spdk_fuse_dispatcher * | disp, |
spdk_fuse_dispatcher_delete_cpl_cb | cb, | ||
void * | cb_arg ) |
Delete a FUSE fsdev dispatcher.
disp | FUSE fsdev dispatcher object. |
cb | Completion callback. |
cb_arg | Context to be passed to the completion callback. |
const char * spdk_fuse_dispatcher_get_fsdev_name | ( | struct spdk_fuse_dispatcher * | disp | ) |
Get underlying fsdev name.
disp | FUSE fsdev dispatcher object. |
struct spdk_io_channel * spdk_fuse_dispatcher_get_io_channel | ( | struct spdk_fuse_dispatcher * | disp | ) |
Obtain an I/O channel for the FUSE fsdev dispatcher object.
I/O channels are bound to threads, so the resulting I/O channel may only be used from the thread it was originally obtained from.
disp | FUSE fsdev dispatcher object. |
int spdk_fuse_dispatcher_set_arch | ( | struct spdk_fuse_dispatcher * | disp, |
enum spdk_fuse_arch | fuse_arch ) |
Set a FUSE request source's HW architecture.
Unless this function is called explicitly, the arch set to SPDK_FUSE_ARCH_NATIVE.
disp | FUSE fsdev dispatcher object. |
fuse_arch | FUSE request source's HW architecture |
int spdk_fuse_dispatcher_submit_request | ( | struct spdk_fuse_dispatcher * | disp, |
struct spdk_io_channel * | ch, | ||
struct iovec * | in_iov, | ||
int | in_iovcnt, | ||
struct iovec * | out_iov, | ||
int | out_iovcnt, | ||
spdk_fuse_dispatcher_submit_cpl_cb | cb, | ||
void * | cb_arg ) |
Submit FUSE request.
disp | FUSE fsdev dispatcher object. |
ch | I/O channel obtained from the spdk_fuse_dispatcher_get_io_channel . |
in_iov | Input IO vectors array. |
in_iovcnt | Size of the input IO vectors array. |
out_iov | Output IO vectors array. |
out_iovcnt | Size of the output IO vectors array. |
cb | Completion callback. |
cb_arg | Context to be passed to the completion callback. |