From b4e986b1d3e44b5566209f4b60f9251b23946432 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 Nov 2008 10:47:30 -0800 Subject: [PATCH] osd: adjust build_prior any_up logic We mark the pg 'down' unless there is at least one osd alive specifically from the last epoch started. --- src/osd/PG.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 769f57946143a..7fa4801065754 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -726,11 +726,15 @@ void PG::build_prior() bool any_survived = false; for (unsigned i=0; iosdmap->is_up(interval.acting[i])) { // is up now - any_up_now = true; - any_survived = true; - if (interval.acting[i] != osd->whoami) // and is not me prior_set.insert(interval.acting[i]); + + // did any osds survive _this_ interval? + any_survived = true; + + // are any osds alive from the last epoch started? + if (interval.first == info.history.last_epoch_started) + any_up_now = true; // has it been up this whole time? // FIXME: what is a 'clean' shutdown? -- 2.39.5