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; ctx->cb_fn = NULL;
rc = spdk_blobfs_fuse_start(ctx->bdev_name, ctx->mountpoint, ctx->fs, rc = blobfs_fuse_start(ctx->bdev_name, ctx->mountpoint, ctx->fs,
blobfs_bdev_unmount, ctx, &ctx->bfuse); blobfs_bdev_unmount, ctx, &ctx->bfuse);
if (rc != 0) { if (rc != 0) {
SPDK_ERRLOG("Failed to mount blobfs on bdev %s to %s\n", ctx->bdev_name, ctx->mountpoint); 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)); SPDK_WARNLOG("Async event(%d) is triggered in bdev %s\n", type, spdk_bdev_get_name(bdev));
if (type == SPDK_BDEV_EVENT_REMOVE) { 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; 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; return;

View File

@ -59,8 +59,8 @@ static const struct spdk_json_object_decoder rpc_blobfs_set_cache_size_decoders[
}; };
static void static void
spdk_rpc_blobfs_set_cache_size(struct spdk_jsonrpc_request *request, rpc_blobfs_set_cache_size(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params) const struct spdk_json_val *params)
{ {
struct rpc_blobfs_set_cache_size req; struct rpc_blobfs_set_cache_size req;
struct spdk_json_write_ctx *w; 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_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) SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
struct rpc_blobfs_detect { struct rpc_blobfs_detect {
@ -135,8 +135,8 @@ _rpc_blobfs_detect_done(void *cb_arg, int fserrno)
} }
static void static void
spdk_rpc_blobfs_detect(struct spdk_jsonrpc_request *request, rpc_blobfs_detect(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params) const struct spdk_json_val *params)
{ {
struct rpc_blobfs_detect *req; 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_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 { struct rpc_blobfs_create {
char *bdev_name; char *bdev_name;
@ -231,8 +231,8 @@ _rpc_blobfs_create_done(void *cb_arg, int fserrno)
} }
static void static void
spdk_rpc_blobfs_create(struct spdk_jsonrpc_request *request, rpc_blobfs_create(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params) const struct spdk_json_val *params)
{ {
struct rpc_blobfs_create *req; 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_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) SPDK_LOG_REGISTER_COMPONENT("blobfs_bdev_rpc", SPDK_LOG_BLOBFS_BDEV_RPC)
#ifdef SPDK_CONFIG_FUSE #ifdef SPDK_CONFIG_FUSE
@ -311,8 +311,8 @@ _rpc_blobfs_mount_done(void *cb_arg, int fserrno)
} }
static void static void
spdk_rpc_blobfs_mount(struct spdk_jsonrpc_request *request, rpc_blobfs_mount(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params) const struct spdk_json_val *params)
{ {
struct rpc_blobfs_mount *req; 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_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 #endif

View File

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

View File

@ -39,14 +39,14 @@
struct spdk_blobfs_fuse; 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); typedef void (*blobfs_fuse_unmount_cb)(void *arg);
int spdk_blobfs_fuse_start(const char *bdev_name, const char *mountpoint, int blobfs_fuse_start(const char *bdev_name, const char *mountpoint,
struct spdk_filesystem *fs, blobfs_fuse_unmount_cb cb_fn, struct spdk_filesystem *fs, blobfs_fuse_unmount_cb cb_fn,
void *cb_arg, struct spdk_blobfs_fuse **bfuse); 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 */ #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 int
spdk_blobfs_fuse_start(const char *bdev_name, const char *mountpoint, struct spdk_filesystem *fs, 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_unmount_cb cb_fn, void *cb_arg, struct spdk_blobfs_fuse **_bfuse)
{ {
if (g_blobfs_fuse_start_fail) { if (g_blobfs_fuse_start_fail) {
return -1; return -1;
@ -177,12 +177,12 @@ spdk_fs_opts_init(struct spdk_blobfs_opts *opts)
} }
void void
spdk_blobfs_fuse_send_request(fs_request_fn fn, void *arg) blobfs_fuse_send_request(fs_request_fn fn, void *arg)
{ {
} }
void 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; g_fs_load_fail = false;
/* spdk_blobfs_fuse_start() fails */ /* blobfs_fuse_start() fails */
g_blobfs_fuse_start_fail = true; g_blobfs_fuse_start_fail = true;
spdk_blobfs_bdev_mount(g_bdev_name, mountpoint, blobfs_bdev_op_complete, NULL); spdk_blobfs_bdev_mount(g_bdev_name, mountpoint, blobfs_bdev_op_complete, NULL);
CU_ASSERT(g_fserrno != 0); CU_ASSERT(g_fserrno != 0);