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: Chunyang Hui <chunyang.hui@intel.com>
Change-Id: I058c580349398b83fed8a8408b089e065b5d2988
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460465
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Chunyang Hui 2019-07-04 15:58:53 -04:00 committed by Changpeng Liu
parent 57efada508
commit 993ab4908c

View File

@ -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);