]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix potential assert in cache _trim method. 13234/head
authorIgor Fedotov <ifedotov@mirantis.com>
Thu, 2 Feb 2017 13:10:01 +0000 (13:10 +0000)
committerIgor Fedotov <ifedotov@mirantis.com>
Thu, 2 Feb 2017 13:10:01 +0000 (13:10 +0000)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/os/bluestore/BlueStore.cc

index 49cd0a37d1f4cf9d19703f3fd182fa010ae8a369..aa9a09fb3efcd8f4b0c6783c624dfb30c096d2e5 100644 (file)
@@ -680,6 +680,7 @@ void BlueStore::LRUCache::_trim(uint64_t onode_max, uint64_t buffer_max)
         break;
       } else {
         p--;
+        num--;
         continue;
       }
     }
@@ -946,10 +947,11 @@ void BlueStore::TwoQCache::_trim(uint64_t onode_max, uint64_t buffer_max)
         break;
       } else {
         p--;
+        num--;
         continue;
       }
     }
-    dout(30) << __func__ << "  trim " << o->oid << dendl;
+    dout(30) << __func__ << " " << o->oid << " num=" << num <<" lru size="<<onode_lru.size()<< dendl;
     if (p != onode_lru.begin()) {
       onode_lru.erase(p--);
     } else {