]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow item to do its own PG unlock
authorSage Weil <sage@redhat.com>
Sun, 5 Nov 2017 16:17:58 +0000 (10:17 -0600)
committerSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 22:07:59 +0000 (16:07 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OpQueueItem.cc

index c9df924378850f929c0b2f2982ffbb1ba86bcc3c..989f582ad70a5f63e0085487984c8e95d1dda92e 100644 (file)
@@ -10002,8 +10002,6 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb)
     tracepoint(osd, opwq_process_finish, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }
-
-  pg->unlock();
 }
 
 void OSD::ShardedOpWQ::_enqueue(OpQueueItem&& item) {
index 90d256f21c18a15bb6916d0420df01de61c3f035..a6e5e70809ca1435d92cc6bead69f37a10064263 100644 (file)
@@ -20,6 +20,7 @@ void PGOpItem::run(OSD *osd,
                    ThreadPool::TPHandle &handle)
 {
   osd->dequeue_op(pg, op, handle);
+  pg->unlock();
 }
 
 void PGSnapTrim::run(OSD *osd,
@@ -27,6 +28,7 @@ void PGSnapTrim::run(OSD *osd,
                    ThreadPool::TPHandle &handle)
 {
   pg->snap_trimmer(epoch_queued);
+  pg->unlock();
 }
 
 void PGScrub::run(OSD *osd,
@@ -34,6 +36,7 @@ void PGScrub::run(OSD *osd,
                    ThreadPool::TPHandle &handle)
 {
   pg->scrub(epoch_queued, handle);
+  pg->unlock();
 }
 
 void PGRecovery::run(OSD *osd,
@@ -41,6 +44,7 @@ void PGRecovery::run(OSD *osd,
                    ThreadPool::TPHandle &handle)
 {
   osd->do_recovery(pg.get(), epoch_queued, reserved_pushes, handle);
+  pg->unlock();
 }