]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: pass op() params by const in PGQueueable 9128/head
authorMichal Jarzabek <stiopa@gmail.com>
Sat, 14 May 2016 15:57:45 +0000 (16:57 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Sat, 14 May 2016 15:57:45 +0000 (16:57 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/osd/OSD.cc
src/osd/OSD.h

index ed1e4bd2e09e5a5e7cc8f96261ef540ffebb2b8d..5ae581cf456a865f525b78b89d176ee7177b0229 100644 (file)
@@ -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);
 }
 
index b68ca96973b9a61f50c27846f167799c364b94a7..31a9f1e0326c1379274513047ea97858bcdce171 100644 (file)
@@ -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