diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 20:58:29 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-04-28 20:58:29 -0700 |
commit | 7fd33607b9bb42a34e9be02a6a343f82776e99a0 (patch) | |
tree | 6238cb383637c12a8b0f67c0085885792bbe2ac2 | |
parent | 0c860c17ba078098ebc4c0c191bf11a5c685c29d (diff) | |
download | ceph-7fd33607b9bb42a34e9be02a6a343f82776e99a0.tar.gz |
osd: skip scrub scheduling if we aren't up
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/OSD.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 93e8d19e37a..f7d146e0c69 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2889,6 +2889,10 @@ void OSD::handle_scrub(MOSDScrub *m) bool OSD::scrub_should_schedule() { double loadavgs[1]; + + if (!is_active()) + return false; + if (getloadavg(loadavgs, 1) != 1) { dout(10) << "scrub_should_schedule couldn't read loadavgs\n" << dendl; return false; |