From 1a68a05c3bf0a9eb111b1c23a20310f942fa9a50 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 5 Nov 2017 10:17:58 -0600 Subject: [PATCH] osd: allow item to do its own PG unlock Signed-off-by: Sage Weil --- src/osd/OSD.cc | 2 -- src/osd/OpQueueItem.cc | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c9df924378850..989f582ad70a5 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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) { diff --git a/src/osd/OpQueueItem.cc b/src/osd/OpQueueItem.cc index 90d256f21c18a..a6e5e70809ca1 100644 --- a/src/osd/OpQueueItem.cc +++ b/src/osd/OpQueueItem.cc @@ -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(); } -- 2.39.5