From 3f3f2fa1721db1169824777e2fd3da26fe4a95c8 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Mon, 22 Dec 2014 17:05:50 +0100 Subject: [PATCH] osd: be_compare_scrubmaps uses incorrect j iterator The code moved from be_select_auth_object to be_compare_scrubmaps 74bd8708dfbfd3c8e7ba3f41d8534609dcbc1237 but the j iterator is use differently although it has the same type. Use map.begin() as a fallback instead. http://tracker.ceph.com/issues/10408 Fixes: #10408 Signed-off-by: Loic Dachary --- src/osd/PGBackend.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index f0a73ff335c9f..6a3e640e3ca13 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -566,8 +566,9 @@ void PGBackend::be_compare_scrubmaps( // Something is better than nothing // TODO: something is NOT better than nothing, do something like // unfound_lost if no valid copies can be found, or just mark unfound - auth = j; - dout(10) << __func__ << ": selecting osd " << j->first + map::const_iterator fallback = maps.begin(); + auth = fallback; + dout(10) << __func__ << ": selecting osd " << fallback->first << " for obj " << *k << ", something is better than nothing, FIXME" << dendl; -- 2.39.5