Skip to content

Commit

Permalink
RocksDB: Remove static and assert for SpdkInitializeThread
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I058c580349398b83fed8a8408b089e065b5d2988
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460465
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Changpeng Liu <[email protected]>
Reviewed-by: Shuhei Matsumoto <[email protected]>
  • Loading branch information
jessehui authored and Changpeng Liu committed Jul 5, 2019
1 parent 57efada commit 993ab49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rocksdb/env_spdk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -638,11 +638,10 @@ class SpdkEnv : public EnvWrapper
* 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);
Expand Down

0 comments on commit 993ab49

Please sign in to comment.