From 06281fdeed84ba7ba1385217b4767d5d18eca0c9 Mon Sep 17 00:00:00 2001 From: x11562 Date: Mon, 11 Jul 2016 17:52:13 +0800 Subject: [PATCH] mon: osdmap's epoch should be more than 0 Signed-off-by: Na Xie --- src/mon/OSDMonitor.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 56b409c6a04..46968153a27 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3104,11 +3104,9 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) epoch_t epoch = 0; int64_t epochnum; - cmd_getval(g_ceph_context, cmdmap, "epoch", epochnum, (int64_t)0); + cmd_getval(g_ceph_context, cmdmap, "epoch", epochnum, (int64_t)osdmap.get_epoch()); epoch = epochnum; - if (!epoch) - epoch = osdmap.get_epoch(); - + bufferlist osdmap_bl; int err = get_version_full(epoch, osdmap_bl); if (err == -ENOENT) {