module/blobfs: remove spdk prefix from static/internal functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2c464bf5a2f220e6f0b8af36dd0dc3283a855df7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2344
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Seth Howell 2020-05-10 11:49:31 -07:00 committed by Tomasz Zawadzki
parent fb32b6d402
commit 30e3f4d900
5 changed files with 59 additions and 59 deletions

View File

@ -253,8 +253,8 @@ _blobfs_bdev_mount_fuse_start(void *_ctx)
*/
ctx->cb_fn = NULL;
rc = spdk_blobfs_fuse_start(ctx->bdev_name, ctx->mountpoint, ctx->fs,
blobfs_bdev_unmount, ctx, &ctx->bfuse);
rc = blobfs_fuse_start(ctx->bdev_name, ctx->mountpoint, ctx->fs,
blobfs_bdev_unmount, ctx, &ctx->bfuse);
if (rc != 0) {
SPDK_ERRLOG("Failed to mount blobfs on bdev %s to %s\n", ctx->bdev_name, ctx->mountpoint);
@ -297,7 +297,7 @@ blobfs_bdev_fuse_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev
SPDK_WARNLOG("Async event(%d) is triggered in bdev %s\n", type, spdk_bdev_get_name(bdev));
if (type == SPDK_BDEV_EVENT_REMOVE) {
spdk_blobfs_fuse_stop(ctx->bfuse);
blobfs_fuse_stop(ctx->bfuse);
}
}
@ -348,7 +348,7 @@ spdk_blobfs_bdev_mount(const char *bdev_name, const char *mountpoint,
goto invalid;
}
spdk_fs_load(bs_dev, spdk_blobfs_fuse_send_request, _blobfs_bdev_mount_load_cb, ctx);
spdk_fs_load(bs_dev, blobfs_fuse_send_request, _blobfs_bdev_mount_load_cb, ctx);
return;

View File

@ -59,8 +59,8 @@ static const struct spdk_json_object_decoder rpc_blobfs_set_cache_size_decoders[
};
static void
spdk_rpc_blobfs_set_cache_size(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
rpc_blobfs_set_cache_size(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_blobfs_set_cache_size req;
struct spdk_json_write_ctx *w;
@ -90,7 +90,7 @@ spdk_rpc_blobfs_set_cache_size(struct spdk_jsonrpc_request *request,
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("blobfs_set_cache_size", spdk_rpc_blobfs_set_cache_size,
SPDK_RPC_REGISTER("blobfs_set_cache_size", rpc_blobfs_set_cache_size,
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
struct rpc_blobfs_detect {
@ -135,8 +135,8 @@ _rpc_blobfs_detect_done(void *cb_arg, int fserrno)
}
static void
spdk_rpc_blobfs_detect(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
rpc_blobfs_detect(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_blobfs_detect *req;
@ -163,7 +163,7 @@ spdk_rpc_blobfs_detect(struct spdk_jsonrpc_request *request,
spdk_blobfs_bdev_detect(req->bdev_name, _rpc_blobfs_detect_done, req);
}
SPDK_RPC_REGISTER("blobfs_detect", spdk_rpc_blobfs_detect, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("blobfs_detect", rpc_blobfs_detect, SPDK_RPC_RUNTIME)
struct rpc_blobfs_create {
char *bdev_name;
@ -231,8 +231,8 @@ _rpc_blobfs_create_done(void *cb_arg, int fserrno)
}
static void
spdk_rpc_blobfs_create(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
rpc_blobfs_create(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_blobfs_create *req;
@ -259,7 +259,7 @@ spdk_rpc_blobfs_create(struct spdk_jsonrpc_request *request,
spdk_blobfs_bdev_create(req->bdev_name, req->cluster_sz, _rpc_blobfs_create_done, req);
}
SPDK_RPC_REGISTER("blobfs_create", spdk_rpc_blobfs_create, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("blobfs_create", rpc_blobfs_create, SPDK_RPC_RUNTIME)
SPDK_LOG_REGISTER_COMPONENT("blobfs_bdev_rpc", SPDK_LOG_BLOBFS_BDEV_RPC)
#ifdef SPDK_CONFIG_FUSE
@ -311,8 +311,8 @@ _rpc_blobfs_mount_done(void *cb_arg, int fserrno)
}
static void
spdk_rpc_blobfs_mount(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
rpc_blobfs_mount(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_blobfs_mount *req;
@ -339,6 +339,6 @@ spdk_rpc_blobfs_mount(struct spdk_jsonrpc_request *request,
spdk_blobfs_bdev_mount(req->bdev_name, req->mountpoint, _rpc_blobfs_mount_done, req);
}
SPDK_RPC_REGISTER("blobfs_mount", spdk_rpc_blobfs_mount, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("blobfs_mount", rpc_blobfs_mount, SPDK_RPC_RUNTIME)
#endif

View File

@ -84,7 +84,7 @@ __call_fn(void *arg1, void *arg2)
}
void
spdk_blobfs_fuse_send_request(fs_request_fn fn, void *arg)
blobfs_fuse_send_request(fs_request_fn fn, void *arg)
{
struct spdk_event *event;
@ -93,7 +93,7 @@ spdk_blobfs_fuse_send_request(fs_request_fn fn, void *arg)
}
static int
spdk_fuse_getattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi)
fuse_getattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi)
{
struct spdk_file_stat stat;
int rc;
@ -115,9 +115,9 @@ spdk_fuse_getattr(const char *path, struct stat *stbuf, struct fuse_file_info *f
}
static int
spdk_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi,
enum fuse_readdir_flags flags)
fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi,
enum fuse_readdir_flags flags)
{
struct spdk_file *file;
const char *filename;
@ -138,19 +138,19 @@ spdk_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
}
static int
spdk_fuse_mknod(const char *path, mode_t mode, dev_t rdev)
fuse_mknod(const char *path, mode_t mode, dev_t rdev)
{
return spdk_fs_create_file(thd_bfuse->fs, thd_bfuse->channel, path);
}
static int
spdk_fuse_unlink(const char *path)
fuse_unlink(const char *path)
{
return spdk_fs_delete_file(thd_bfuse->fs, thd_bfuse->channel, path);
}
static int
spdk_fuse_truncate(const char *path, off_t size, struct fuse_file_info *fi)
fuse_truncate(const char *path, off_t size, struct fuse_file_info *fi)
{
struct spdk_file *file;
int rc;
@ -171,13 +171,13 @@ spdk_fuse_truncate(const char *path, off_t size, struct fuse_file_info *fi)
}
static int
spdk_fuse_utimens(const char *path, const struct timespec tv[2], struct fuse_file_info *fi)
fuse_utimens(const char *path, const struct timespec tv[2], struct fuse_file_info *fi)
{
return 0;
}
static int
spdk_fuse_open(const char *path, struct fuse_file_info *info)
fuse_open(const char *path, struct fuse_file_info *info)
{
struct spdk_file *file;
int rc;
@ -192,7 +192,7 @@ spdk_fuse_open(const char *path, struct fuse_file_info *info)
}
static int
spdk_fuse_release(const char *path, struct fuse_file_info *info)
fuse_release(const char *path, struct fuse_file_info *info)
{
struct spdk_file *file = (struct spdk_file *)info->fh;
@ -200,7 +200,7 @@ spdk_fuse_release(const char *path, struct fuse_file_info *info)
}
static int
spdk_fuse_read(const char *path, char *buf, size_t len, off_t offset, struct fuse_file_info *info)
fuse_read(const char *path, char *buf, size_t len, off_t offset, struct fuse_file_info *info)
{
struct spdk_file *file = (struct spdk_file *)info->fh;
@ -208,8 +208,8 @@ spdk_fuse_read(const char *path, char *buf, size_t len, off_t offset, struct fus
}
static int
spdk_fuse_write(const char *path, const char *buf, size_t len, off_t offset,
struct fuse_file_info *info)
fuse_write(const char *path, const char *buf, size_t len, off_t offset,
struct fuse_file_info *info)
{
struct spdk_file *file = (struct spdk_file *)info->fh;
int rc;
@ -223,37 +223,37 @@ spdk_fuse_write(const char *path, const char *buf, size_t len, off_t offset,
}
static int
spdk_fuse_flush(const char *path, struct fuse_file_info *info)
fuse_flush(const char *path, struct fuse_file_info *info)
{
return 0;
}
static int
spdk_fuse_fsync(const char *path, int datasync, struct fuse_file_info *info)
fuse_fsync(const char *path, int datasync, struct fuse_file_info *info)
{
return 0;
}
static int
spdk_fuse_rename(const char *old_path, const char *new_path, unsigned int flags)
fuse_rename(const char *old_path, const char *new_path, unsigned int flags)
{
return spdk_fs_rename_file(thd_bfuse->fs, thd_bfuse->channel, old_path, new_path);
}
static struct fuse_operations spdk_fuse_oper = {
.getattr = spdk_fuse_getattr,
.readdir = spdk_fuse_readdir,
.mknod = spdk_fuse_mknod,
.unlink = spdk_fuse_unlink,
.truncate = spdk_fuse_truncate,
.utimens = spdk_fuse_utimens,
.open = spdk_fuse_open,
.release = spdk_fuse_release,
.read = spdk_fuse_read,
.write = spdk_fuse_write,
.flush = spdk_fuse_flush,
.fsync = spdk_fuse_fsync,
.rename = spdk_fuse_rename,
.getattr = fuse_getattr,
.readdir = fuse_readdir,
.mknod = fuse_mknod,
.unlink = fuse_unlink,
.truncate = fuse_truncate,
.utimens = fuse_utimens,
.open = fuse_open,
.release = fuse_release,
.read = fuse_read,
.write = fuse_write,
.flush = fuse_flush,
.fsync = fuse_fsync,
.rename = fuse_rename,
};
static void *
@ -284,8 +284,8 @@ fuse_loop_new_thread(void *arg)
}
int
spdk_blobfs_fuse_start(const char *bdev_name, const char *mountpoint, struct spdk_filesystem *fs,
blobfs_fuse_unmount_cb cb_fn, void *cb_arg, struct spdk_blobfs_fuse **_bfuse)
blobfs_fuse_start(const char *bdev_name, const char *mountpoint, struct spdk_filesystem *fs,
blobfs_fuse_unmount_cb cb_fn, void *cb_arg, struct spdk_blobfs_fuse **_bfuse)
{
/* Set argv[1] as bdev_name in order to show bdev_name as the mounting source */
char *argv[1] = {(char *)bdev_name};
@ -351,7 +351,7 @@ err:
}
void
spdk_blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse)
blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse)
{
fuse_session_exit(fuse_get_session(bfuse->fuse_handle));
pthread_kill(bfuse->fuse_tid, SIGINT);

View File

@ -39,14 +39,14 @@
struct spdk_blobfs_fuse;
void spdk_blobfs_fuse_send_request(fs_request_fn fn, void *arg);
void blobfs_fuse_send_request(fs_request_fn fn, void *arg);
typedef void (*blobfs_fuse_unmount_cb)(void *arg);
int spdk_blobfs_fuse_start(const char *bdev_name, const char *mountpoint,
struct spdk_filesystem *fs, blobfs_fuse_unmount_cb cb_fn,
void *cb_arg, struct spdk_blobfs_fuse **bfuse);
int blobfs_fuse_start(const char *bdev_name, const char *mountpoint,
struct spdk_filesystem *fs, blobfs_fuse_unmount_cb cb_fn,
void *cb_arg, struct spdk_blobfs_fuse **bfuse);
void spdk_blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse);
void blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse);
#endif /* SPDK_BLOBFS_FUSE_H */

View File

@ -132,8 +132,8 @@ spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module)
}
int
spdk_blobfs_fuse_start(const char *bdev_name, const char *mountpoint, struct spdk_filesystem *fs,
blobfs_fuse_unmount_cb cb_fn, void *cb_arg, struct spdk_blobfs_fuse **_bfuse)
blobfs_fuse_start(const char *bdev_name, const char *mountpoint, struct spdk_filesystem *fs,
blobfs_fuse_unmount_cb cb_fn, void *cb_arg, struct spdk_blobfs_fuse **_bfuse)
{
if (g_blobfs_fuse_start_fail) {
return -1;
@ -177,12 +177,12 @@ spdk_fs_opts_init(struct spdk_blobfs_opts *opts)
}
void
spdk_blobfs_fuse_send_request(fs_request_fn fn, void *arg)
blobfs_fuse_send_request(fs_request_fn fn, void *arg)
{
}
void
spdk_blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse)
blobfs_fuse_stop(struct spdk_blobfs_fuse *bfuse)
{
}
@ -307,7 +307,7 @@ spdk_blobfs_bdev_mount_test(void)
g_fs_load_fail = false;
/* spdk_blobfs_fuse_start() fails */
/* blobfs_fuse_start() fails */
g_blobfs_fuse_start_fail = true;
spdk_blobfs_bdev_mount(g_bdev_name, mountpoint, blobfs_bdev_op_complete, NULL);
CU_ASSERT(g_fserrno != 0);