]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/cohort_lru.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / common / cohort_lru.h
index 99316b9267968017671840bb0a27c2963af8f665..3e002344046da71ec1ec9817279fc2b065c115f9 100644 (file)
@@ -149,8 +149,8 @@ namespace cohort {
              --(o->lru_refcnt);
              /* assertions that o state has not changed across
               * relock */
-             assert(o->lru_refcnt == SENTINEL_REFCNT);
-             assert(o->lru_flags & FLAG_INLRU);
+             ceph_assert(o->lru_refcnt == SENTINEL_REFCNT);
+             ceph_assert(o->lru_flags & FLAG_INLRU);
              Object::Queue::iterator it =
                Object::Queue::s_iterator_to(*o);
              lane.q.erase(it);
@@ -173,7 +173,7 @@ namespace cohort {
       LRU(int lanes, uint32_t _hiwat)
        : n_lanes(lanes), evict_lane(0), lane_hiwat(_hiwat)
          {
-           assert(n_lanes > 0);
+           ceph_assert(n_lanes > 0);
            qlane = new Lane[n_lanes];
          }
 
@@ -256,7 +256,7 @@ namespace cohort {
          lane.q.push_back(*o);
          break;
        default:
-         abort();
+         ceph_abort();
          break;
        }
        if (flags & FLAG_INITIAL)
@@ -308,7 +308,7 @@ namespace cohort {
       struct Latch {
        Partition* p;
        LK* lock;
-       insert_commit_data commit_data;
+       insert_commit_data commit_data{};
 
        Latch() : p(nullptr), lock(nullptr) {}
       };
@@ -336,7 +336,7 @@ namespace cohort {
       }
 
       TreeX(int n_part=1, int csz=127) : n_part(n_part), csz(csz) {
-       assert(n_part > 0);
+       ceph_assert(n_part > 0);
        part = new Partition[n_part];
        for (int ix = 0; ix < n_part; ++ix) {
          Partition& p = part[ix];
@@ -460,7 +460,7 @@ namespace cohort {
       void drain(std::function<void(T*)> uref,
                 uint32_t flags = FLAG_NONE) {
        /* clear a table, call supplied function on
-        * each element found (e.g., retuns sentinel
+        * each element found (e.g., returns sentinel
         * references) */
        Object::Queue2 drain_q;
        for (int t_ix = 0; t_ix < n_part; ++t_ix) {