Skip to content

Commit

Permalink
Merge pull request #10668 from stiopaa1/mon_mdsmonitor_moveCUpdatedClass
Browse files Browse the repository at this point in the history
mon/MDSMonitor: move C_Updated class to .cc file

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
gregsfortytwo committed Aug 31, 2016
2 parents 8b721b9 + 3bdf96c commit 9292ecf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 18 additions & 0 deletions src/mon/MDSMonitor.cc
Expand Up @@ -480,6 +480,24 @@ bool MDSMonitor::prepare_update(MonOpRequestRef op)
}


namespace {
class C_Updated : public Context {
MDSMonitor *mm;
MonOpRequestRef op;
public:
C_Updated(MDSMonitor *a, MonOpRequestRef c) :
mm(a), op(c) {}
void finish(int r) {
if (r >= 0)
mm->_updated(op); // success
else if (r == -ECANCELED) {
mm->mon->no_reply(op);
} else {
mm->dispatch(op); // try again
}
}
};
}

bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
{
Expand Down
18 changes: 0 additions & 18 deletions src/mon/MDSMonitor.h
Expand Up @@ -46,24 +46,6 @@ class MDSMonitor : public PaxosService {

// my helpers
void print_map(FSMap &m, int dbl=7);

class C_Updated : public Context {
MDSMonitor *mm;
MonOpRequestRef op;
public:
C_Updated(MDSMonitor *a, MonOpRequestRef c) :
mm(a), op(c) {}
void finish(int r) {
if (r >= 0)
mm->_updated(op); // success
else if (r == -ECANCELED) {
mm->mon->no_reply(op);
} else {
mm->dispatch(op); // try again
}
}
};

void create_new_fs(FSMap &m, const std::string &name, int metadata_pool, int data_pool);

version_t get_trim_to();
Expand Down

0 comments on commit 9292ecf

Please sign in to comment.