summaryrefslogtreecommitdiffstats
path: root/src/mon/MonMap.h
diff options
context:
space:
mode:
authorGreg Farnum <gregf@hq.newdream.net>2009-10-09 01:28:39 +0200
committerGreg Farnum <gregf@hq.newdream.net>2009-10-10 01:44:51 +0200
commited70b5ae1faba8271098ea4287b09f70be39cd00 (patch)
tree4aff77b921473f276f4c9cb6c3362fe4ea405e81 /src/mon/MonMap.h
parentmon: Add MonmapMonitor to whole system (diff)
downloadceph-ed70b5ae1faba8271098ea4287b09f70be39cd00.tar.xz
ceph-ed70b5ae1faba8271098ea4287b09f70be39cd00.zip
mdsmap: add a last_changed utime_t data member.
Diffstat (limited to 'src/mon/MonMap.h')
-rw-r--r--src/mon/MonMap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h
index 9313d9f0ec3..24f4ef0f17b 100644
--- a/src/mon/MonMap.h
+++ b/src/mon/MonMap.h
@@ -26,11 +26,13 @@ class MonMap {
epoch_t epoch; // what epoch/version of the monmap
ceph_fsid_t fsid;
vector<entity_inst_t> mon_inst;
+ utime_t last_changed;
int last_mon; // last mon i talked to
MonMap() : epoch(0), last_mon(-1) {
memset(&fsid, 0, sizeof(fsid));
+ last_changed = g_clock.now();
}
ceph_fsid_t& get_fsid() { return fsid; }
@@ -89,6 +91,7 @@ class MonMap {
::encode_raw(fsid, blist);
::encode(epoch, blist);
::encode(mon_inst, blist);
+ ::encode(last_changed, blist);
}
void decode(bufferlist& blist) {
bufferlist::iterator p = blist.begin();
@@ -100,6 +103,7 @@ class MonMap {
::decode_raw(fsid, p);
::decode(epoch, p);
::decode(mon_inst, p);
+ ::decode(last_changed, p);
}