Commit 993ab490 authored by Chunyang Hui's avatar Chunyang Hui Committed by Changpeng Liu
Browse files

RocksDB: Remove static and assert for SpdkInitializeThread



RocksDB spdk-v5.13.4 and spdk-v5.18.4 still need
to call SpdkInitializeThread in its env init.
Static will trigger make error. Thus removed.

For removing assert, we already have enough check to
make sure the allocate won't happen twice. The assert
here is redundant.

Signed-off-by: default avatarChunyang Hui <chunyang.hui@intel.com>
Change-Id: I058c580349398b83fed8a8408b089e065b5d2988
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460465


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 57efada5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ std::string g_bdev_name;
volatile bool g_spdk_ready = false;
volatile bool g_spdk_start_failure = false;

static void SpdkInitializeThread(void);
void SpdkInitializeThread(void);

class SpdkThreadCtx
{
@@ -638,11 +638,10 @@ public:
 * SpdkInitializeThread function, so that the main thread can explicitly
 * call it after the filesystem has been loaded.
 */
static void SpdkInitializeThread(void)
void SpdkInitializeThread(void)
{
	struct spdk_thread *thread;

	assert(g_sync_args.channel == NULL);
	if (g_fs != NULL) {
		thread = spdk_thread_create("spdk_rocksdb", NULL);
		spdk_set_thread(thread);