]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monmaptool: new maps get epoch 0
authorSage Weil <sage@newdream.net>
Fri, 11 Nov 2011 19:40:20 +0000 (11:40 -0800)
committerSage Weil <sage@newdream.net>
Fri, 11 Nov 2011 19:41:42 +0000 (11:41 -0800)
Just for consistency's sake.

Signed-off-by: Sage Weil <sage@newdream.net>
src/monmaptool.cc

index aed90751545f859600b633b7b4cab1b8d8d80b23..dd9f95c6d46158094df85fcf0bf58ffc394ac088 100644 (file)
@@ -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)