]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not release_reserved_pushes when requeuing 21229/head
authorSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 02:24:07 +0000 (21:24 -0500)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 02:24:07 +0000 (21:24 -0500)
Back in 3cc48278bf0ee5c9535d04b60a661f988c50063b we refactoring the sharded
wq and incorrectly included code that would release_reserved_pushes for
items that were queued and deferred and then woken and put back in the
queue. The reserved_pushes are for recovery ops that are in flight in the
queue, which includes the priority queue *and* the waiting_for_pg; the code
we replaced would release these only when dequeueing an item (or items) for
processing (or discard).

In master, this code is fixed as part of the peering fast dispatch and
OSDShard refactor.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 0cc42eed5998a99d04df2b9fdb339561e31c5f1d..905a199638bedd7fe91baa1bd7cf46afb8197572 100644 (file)
@@ -10255,7 +10255,6 @@ void OSD::ShardedOpWQ::wake_pg_waiters(spg_t pgid)
   uint32_t shard_index = pgid.hash_to_shard(shard_list.size());
   auto sdata = shard_list[shard_index];
   bool queued = false;
-  unsigned pushes_to_free = 0;
   {
     Mutex::Locker l(sdata->sdata_op_ordering_lock);
     auto p = sdata->pg_slots.find(pgid);
@@ -10268,18 +10267,12 @@ void OSD::ShardedOpWQ::wake_pg_waiters(spg_t pgid)
           ++i) {
        sdata->_enqueue_front(make_pair(pgid, *i), osd->op_prio_cutoff);
       }
-      for (auto& q : p->second.to_process) {
-       pushes_to_free += q.get_reserved_pushes();
-      }
       p->second.to_process.clear();
       p->second.waiting_for_pg = false;
       ++p->second.requeue_seq;
       queued = true;
     }
   }
-  if (pushes_to_free > 0) {
-    osd->service.release_reserved_pushes(pushes_to_free);
-  }
   if (queued) {
     sdata->sdata_lock.Lock();
     sdata->sdata_cond.SignalOne();