Loading...
Searching...
No Matches
blobfs_bdev.h File Reference

Operations on blobfs whose backing device is spdk_bdev. More...

Typedefs

typedef void(* spdk_blobfs_bdev_op_complete) (void *cb_arg, int fserrno)
 blobfs on bdev operation completion callback.
 

Functions

void spdk_blobfs_bdev_detect (const char *bdev_name, spdk_blobfs_bdev_op_complete cb_fn, void *cb_arg)
 Detect whether blobfs exists on the given device.
 
void spdk_blobfs_bdev_create (const char *bdev_name, uint32_t cluster_sz, spdk_blobfs_bdev_op_complete cb_fn, void *cb_arg)
 Create a blobfs on the given device.
 
void spdk_blobfs_bdev_mount (const char *bdev_name, const char *mountpoint, spdk_blobfs_bdev_op_complete cb_fn, void *cb_arg)
 Mount a blobfs on given device to a host path by FUSE.
 

Detailed Description

Operations on blobfs whose backing device is spdk_bdev.

Typedef Documentation

◆ spdk_blobfs_bdev_op_complete

typedef void(* spdk_blobfs_bdev_op_complete) (void *cb_arg, int fserrno)

blobfs on bdev operation completion callback.

Parameters
cb_argCallback argument.
fserrno0 if it completed successfully, or negative errno if it failed.

Function Documentation

◆ spdk_blobfs_bdev_create()

void spdk_blobfs_bdev_create ( const char * bdev_name,
uint32_t cluster_sz,
spdk_blobfs_bdev_op_complete cb_fn,
void * cb_arg )

Create a blobfs on the given device.

Parameters
bdev_nameName of block device.
cluster_szSize of cluster in bytes. Must be multiple of 4KiB page size.
cb_fnCalled when the creation is complete.
cb_argArgument passed to function cb_fn.

◆ spdk_blobfs_bdev_detect()

void spdk_blobfs_bdev_detect ( const char * bdev_name,
spdk_blobfs_bdev_op_complete cb_fn,
void * cb_arg )

Detect whether blobfs exists on the given device.

Parameters
bdev_nameName of block device.
cb_fnCalled when the detecting is complete. fserrno is -EILSEQ if no blobfs exists.
cb_argArgument passed to function cb_fn.

◆ spdk_blobfs_bdev_mount()

void spdk_blobfs_bdev_mount ( const char * bdev_name,
const char * mountpoint,
spdk_blobfs_bdev_op_complete cb_fn,
void * cb_arg )

Mount a blobfs on given device to a host path by FUSE.

A new thread is created dedicatedly for one mountpoint to handle FUSE request by blobfs API.

Parameters
bdev_nameName of block device.
mountpointHost path to mount blobfs.
cb_fnCalled when mount operation is complete. fserrno is -EILSEQ if no blobfs exists.
cb_argArgument passed to function cb_fn.