summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-09 14:12:15 -0700
committerSage Weil <sage@inktank.com>2013-07-13 21:11:15 -0700
commit6af0ed9bc4cc955f8c30ad9dc6e9095599f323d0 (patch)
tree0a86dc56bbe92fd26300db0638fb5ce084148289
parent5642155ba5ca9b384a7af058a6538ac00c2a592d (diff)
downloadceph-6af0ed9bc4cc955f8c30ad9dc6e9095599f323d0.tar.gz
mon: do not scrub if scrub is in progress
This prevents an assert from unexpected scrub results from the previous scrub on the leader. Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 00ae543b3e32f89d906a0e934792cc5309f57696)
-rw-r--r--src/mon/Monitor.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index b3cb45a1572..6a91215d31e 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -3997,6 +3997,11 @@ int Monitor::scrub()
return -EOPNOTSUPP;
}
+ if (!scrub_result.empty()) {
+ clog.info() << "scrub already in progress\n";
+ return -EBUSY;
+ }
+
scrub_result.clear();
scrub_version = paxos->get_version();