osd: clear INCONSISTENT if scrub detects no errors

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2010-12-17 10:59:45 -08:00
parent b190875548
commit 1cfad2ea77

View File

@ -3310,7 +3310,7 @@ void PG::scrub()
ss << ", " << fixed << " fixed";
osd->get_logclient()->log(errors ? LOG_ERROR:LOG_INFO, ss);
if (!(errors - fixed) && repair)
if (errors == 0 || (repair && (errors - fixed) == 0))
state_clear(PG_STATE_INCONSISTENT);
state_clear(PG_STATE_REPAIR);