]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Expand TwoQBufferCacheShard::_audit
authorAdam Kupczyk <akupczyk@ibm.com>
Fri, 27 Jan 2023 15:13:10 +0000 (15:13 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Wed, 10 May 2023 11:47:46 +0000 (11:47 +0000)
Add more checks on consistency.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
src/os/bluestore/BlueStore.cc

index 43fed6cc9e918d8fb2cde7301c5014ed19a624ac..c163ecc365e075c61011789480b2c11e71308d3c 100644 (file)
@@ -1634,6 +1634,7 @@ public:
     dout(10) << __func__ << " " << when << " start" << dendl;
     uint64_t s = 0;
     for (auto i = hot.begin(); i != hot.end(); ++i) {
+      ceph_assert(i->cache_private == BUFFER_HOT);
       s += i->length;
     }
 
@@ -1647,6 +1648,7 @@ public:
     }
 
     for (auto i = warm_in.begin(); i != warm_in.end(); ++i) {
+      ceph_assert(i->cache_private == BUFFER_WARM_IN);
       s += i->length;
     }
 
@@ -1665,6 +1667,10 @@ public:
       ceph_assert(s == buffer_bytes);
     }
 
+    for (auto i = warm_out.begin(); i != warm_out.end(); ++i) {
+      ceph_assert(i->cache_private == BUFFER_WARM_OUT);
+      ceph_assert(i->is_empty());
+    }
     dout(20) << __func__ << " " << when << " buffer_bytes " << buffer_bytes
              << " ok" << dendl;
   }