From 8575292212aa37a98f3d42f26cce16a885462d27 Mon Sep 17 00:00:00 2001 From: jimifm Date: Mon, 12 Sep 2016 15:08:04 +0800 Subject: [PATCH] filestore/FDCache.h:Fix bug when filestore_fd_cache_shards = 0 Signed-off-by: jimifm --- src/os/filestore/FDCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/filestore/FDCache.h b/src/os/filestore/FDCache.h index 566e65abbe9..0677afa1ba4 100644 --- a/src/os/filestore/FDCache.h +++ b/src/os/filestore/FDCache.h @@ -56,7 +56,7 @@ private: public: explicit FDCache(CephContext *cct) : cct(cct), - registry_shards(cct->_conf->filestore_fd_cache_shards) { + registry_shards(MAX(cct->_conf->filestore_fd_cache_shards, 1)) { assert(cct); cct->_conf->add_observer(this); registry = new SharedLRU[registry_shards]; -- 2.47.3