Commit 55478de6 authored by yidong0635's avatar yidong0635 Committed by Tomasz Zawadzki
Browse files

lib/blobfs: Initialize global TAILQ HEAD variable at definition.



Signed-off-by: default avataryidong0635 <dongx.yi@intel.com>
Change-Id: I3306e38781ceb2e98fbf9e62c4e02dd010ce62f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4598


Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent a3d1419b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@

static uint64_t g_fs_cache_size = BLOBFS_DEFAULT_CACHE_SIZE;
static struct spdk_mempool *g_cache_pool;
static TAILQ_HEAD(, spdk_file) g_caches;
static TAILQ_HEAD(, spdk_file) g_caches = TAILQ_HEAD_INITIALIZER(g_caches);
static struct spdk_poller *g_cache_pool_mgmt_poller;
static struct spdk_thread *g_cache_pool_thread;
#define BLOBFS_CACHE_POOL_POLL_PERIOD_IN_US 1000ULL
@@ -292,7 +292,6 @@ __start_cache_pool_mgmt(void *ctx)
			    "increase the memory and try again\n");
		assert(false);
	}
	TAILQ_INIT(&g_caches);

	assert(g_cache_pool_mgmt_poller == NULL);
	g_cache_pool_mgmt_poller = SPDK_POLLER_REGISTER(_blobfs_cache_pool_reclaim, NULL,