]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore/FDCache.h:Fix bug when filestore_fd_cache_shards = 0 11048/head
authorjimifm <hong.zhangoole@gmail.com>
Mon, 12 Sep 2016 07:08:04 +0000 (15:08 +0800)
committerjimifm <hong.zhangoole@gmail.com>
Mon, 12 Sep 2016 07:13:02 +0000 (15:13 +0800)
Signed-off-by: jimifm <hong.zhangoole@gmail.com>
src/os/filestore/FDCache.h

index 566e65abbe9041d8217de4b4453ae305f228aaf1..0677afa1ba45f3d31ebf01740eeb308a2912e439 100644 (file)
@@ -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<ghobject_t, FD, ghobject_t::BitwiseComparator>[registry_shards];