vhost: remove spdk_ prefix from some static function

spdk_ prefix should be only used on public API functions.

Change-Id: I663b107bd6b1c92c2c6263f2ec7c763d9812e7fe
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459163
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Darek Stojaczyk 2019-06-24 12:35:12 +02:00
parent 4de67bbf6d
commit 5e63804146

View File

@ -937,12 +937,12 @@ spdk_vhost_event_cb(void *arg1)
pthread_mutex_unlock(&g_spdk_vhost_mutex);
}
static void spdk_vhost_external_event_foreach_continue(struct spdk_vhost_dev *vdev,
struct spdk_vhost_session *vsession,
spdk_vhost_session_fn fn, void *arg);
static void foreach_session_continue(struct spdk_vhost_dev *vdev,
struct spdk_vhost_session *vsession,
spdk_vhost_session_fn fn, void *arg);
static void
spdk_vhost_event_async_foreach_fn(void *arg1)
foreach_session_continue_cb(void *arg1)
{
struct spdk_vhost_session_fn_ctx *ctx = arg1;
struct spdk_vhost_session *vsession = NULL;
@ -951,7 +951,7 @@ spdk_vhost_event_async_foreach_fn(void *arg1)
if (pthread_mutex_trylock(&g_spdk_vhost_mutex) != 0) {
spdk_thread_send_msg(spdk_get_thread(),
spdk_vhost_event_async_foreach_fn, arg1);
foreach_session_continue_cb, arg1);
return;
}
@ -963,7 +963,6 @@ spdk_vhost_event_async_foreach_fn(void *arg1)
goto out_unlock_continue;
}
if (vsession->started && vsession->poll_group->thread != spdk_get_thread()) {
/* if session has been relocated to other thread, it is no longer thread-safe
* to access its contents here. Even though we're running under the global
@ -971,7 +970,7 @@ spdk_vhost_event_async_foreach_fn(void *arg1)
* the session thread as many times as necessary.
*/
spdk_thread_send_msg(vsession->poll_group->thread,
spdk_vhost_event_async_foreach_fn, arg1);
foreach_session_continue_cb, arg1);
pthread_mutex_unlock(&g_spdk_vhost_mutex);
return;
}
@ -983,7 +982,7 @@ spdk_vhost_event_async_foreach_fn(void *arg1)
out_unlock_continue:
vsession = spdk_vhost_session_next(vdev, ctx->vsession_id);
spdk_vhost_external_event_foreach_continue(vdev, vsession, ctx->cb_fn, ctx->user_ctx);
foreach_session_continue(vdev, vsession, ctx->cb_fn, ctx->user_ctx);
out_unlock:
pthread_mutex_unlock(&g_spdk_vhost_mutex);
free(ctx);
@ -1334,9 +1333,9 @@ destroy_connection(int vid)
}
static void
spdk_vhost_external_event_foreach_continue(struct spdk_vhost_dev *vdev,
struct spdk_vhost_session *vsession,
spdk_vhost_session_fn fn, void *arg)
foreach_session_continue(struct spdk_vhost_dev *vdev,
struct spdk_vhost_session *vsession,
spdk_vhost_session_fn fn, void *arg)
{
struct spdk_vhost_session_fn_ctx *ev_ctx;
int rc;
@ -1372,7 +1371,7 @@ spdk_vhost_external_event_foreach_continue(struct spdk_vhost_dev *vdev,
ev_ctx->user_ctx = arg;
spdk_thread_send_msg(vsession->poll_group->thread,
spdk_vhost_event_async_foreach_fn, ev_ctx);
foreach_session_continue_cb, ev_ctx);
return;
out_finish_foreach:
@ -1392,7 +1391,7 @@ spdk_vhost_dev_foreach_session(struct spdk_vhost_dev *vdev,
assert(vdev->pending_async_op_num < UINT32_MAX);
vdev->pending_async_op_num++;
spdk_vhost_external_event_foreach_continue(vdev, vsession, fn, arg);
foreach_session_continue(vdev, vsession, fn, arg);
}
void