From d9bd6654f2dfa283ba6e6fa53bc0014a4890de7d Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Sat, 14 May 2016 16:57:45 +0100 Subject: [PATCH] osd/OSD: pass op() params by const in PGQueueable Signed-off-by: Michal Jarzabek --- src/osd/OSD.cc | 6 +++--- src/osd/OSD.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index ed1e4bd2e09..5ae581cf456 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -159,15 +159,15 @@ static ostream& _prefix(std::ostream* _dout, int whoami, epoch_t epoch) { return *_dout << "osd." << whoami << " " << epoch << " "; } -void PGQueueable::RunVis::operator()(OpRequestRef &op) { +void PGQueueable::RunVis::operator()(const OpRequestRef &op) { return osd->dequeue_op(pg, op, handle); } -void PGQueueable::RunVis::operator()(PGSnapTrim &op) { +void PGQueueable::RunVis::operator()(const PGSnapTrim &op) { return pg->snap_trimmer(op.epoch_queued); } -void PGQueueable::RunVis::operator()(PGScrub &op) { +void PGQueueable::RunVis::operator()(const PGScrub &op) { return pg->scrub(op.epoch_queued, handle); } diff --git a/src/osd/OSD.h b/src/osd/OSD.h index b68ca96973b..31a9f1e0326 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -357,9 +357,9 @@ class PGQueueable { ThreadPool::TPHandle &handle; RunVis(OSD *osd, PGRef &pg, ThreadPool::TPHandle &handle) : osd(osd), pg(pg), handle(handle) {} - void operator()(OpRequestRef &op); - void operator()(PGSnapTrim &op); - void operator()(PGScrub &op); + void operator()(const OpRequestRef &op); + void operator()(const PGSnapTrim &op); + void operator()(const PGScrub &op); }; public: // cppcheck-suppress noExplicitConstructor