From: jimifm Date: Mon, 12 Sep 2016 07:08:04 +0000 (+0800) Subject: filestore/FDCache.h:Fix bug when filestore_fd_cache_shards = 0 X-Git-Tag: v11.0.1~116^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8575292212aa37a98f3d42f26cce16a885462d27;p=ceph.git filestore/FDCache.h:Fix bug when filestore_fd_cache_shards = 0 Signed-off-by: jimifm --- 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];