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. More...
 

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. More...
 
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. More...
 

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.