Commit 5e638041 authored by Darek Stojaczyk's avatar Darek Stojaczyk
Browse files

vhost: remove spdk_ prefix from some static function



spdk_ prefix should be only used on public API functions.

Change-Id: I663b107bd6b1c92c2c6263f2ec7c763d9812e7fe
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459163


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 4de67bbf
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -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,
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,7 +1333,7 @@ destroy_connection(int vid)
}

static void
spdk_vhost_external_event_foreach_continue(struct spdk_vhost_dev *vdev,
foreach_session_continue(struct spdk_vhost_dev *vdev,
			 struct spdk_vhost_session *vsession,
			 spdk_vhost_session_fn fn, void *arg)
{
@@ -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