summaryrefslogtreecommitdiff
path: root/src/monmaptool.cc
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-11-11 11:40:20 -0800
committerSage Weil <sage@newdream.net>2011-11-11 11:41:42 -0800
commitf31825cee5300c708800a01a08201eef2bc03c0c (patch)
tree25681239ddd40b33c31ee6b4f8b260d78ff4742b /src/monmaptool.cc
parent65f797ea47f8b352276a2ad238c95a6dac63b39f (diff)
downloadceph-f31825cee5300c708800a01a08201eef2bc03c0c.tar.gz
monmaptool: new maps get epoch 0
Just for consistency's sake. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/monmaptool.cc')
-rw-r--r--src/monmaptool.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/monmaptool.cc b/src/monmaptool.cc
index aed90751545..dd9f95c6d46 100644
--- a/src/monmaptool.cc
+++ b/src/monmaptool.cc
@@ -120,6 +120,7 @@ int main(int argc, const char **argv)
}
if (create) {
+ monmap.epoch = 0;
monmap.created = ceph_clock_now(g_ceph_context);
monmap.last_changed = monmap.created;
srand(getpid() + time(0));
@@ -151,7 +152,7 @@ int main(int argc, const char **argv)
if (!print && !modified)
usage();
- if (modified)
+ if (modified && !create)
monmap.epoch++;
if (print)