Commit d7541156 authored by Yanbo Zhou's avatar Yanbo Zhou Committed by Jim Harris
Browse files

include/blobfs.h: add comments for callback functions



Change-Id: I9f04589440d2080c93f46838e54da7e6450a18ec
Signed-off-by: default avatarYanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/407687


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 6b504fda
Loading
Loading
Loading
Loading
+46 −2
Original line number Diff line number Diff line
@@ -62,16 +62,60 @@ struct spdk_file_stat {
	uint64_t	size;
};

/**
 * Filesystem operation completion callback with handle.
 *
 * \param ctx Context for the operation.
 * \param fs Handle to a blobfs.
 * \param fserrno 0 if it completed successfully, or negative errno if it failed.
 */
typedef void (*spdk_fs_op_with_handle_complete)(void *ctx, struct spdk_filesystem *fs,
		int fserrno);

/**
 * File operation completion callback with handle.
 *
 * \param ctx Context for the operation.
 * \param f Handle to a file.
 * \param fserrno 0 if it completed successfully, or negative errno if it failed.
 */
typedef void (*spdk_file_op_with_handle_complete)(void *ctx, struct spdk_file *f, int fserrno);
typedef spdk_bs_op_complete spdk_fs_op_complete;

/**
 * File operation completion callback.
 *
 * \param ctx Context for the operation.
 * \param fserrno 0 if it completed successfully, or negative errno if it failed.
 */
typedef void (*spdk_file_op_complete)(void *ctx, int fserrno);

/**
 * File stat operation completion callback.
 *
 * \param ctx Context for the operation.
 * \param stat Handle to the stat about the file.
 * \param fserrno 0 if it completed successfully, or negative errno if it failed.
 */
typedef void (*spdk_file_stat_op_complete)(void *ctx, struct spdk_file_stat *stat, int fserrno);

typedef void (*fs_request_fn)(void *);
typedef void (*fs_send_request_fn)(fs_request_fn, void *);
/**
 * Function for a request of file system.
 *
 * \param arg Argument to the request function.
 */
typedef void (*fs_request_fn)(void *arg);

/**
 * Function for sending request.
 *
 * This function will be invoked any time when the filesystem wants to pass a
 * message to the main dispatch thread.
 *
 * \param fs_request_fn A pointer to the request function.
 * \param arg Argument to the request function.
 */
typedef void (*fs_send_request_fn)(fs_request_fn, void *arg);

/**
 * Initialize a spdk_blobfs_opts structure to the default option values.