From 484a147e9ee1a988bf752b9bb08d8ad4a897fa64 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 5 Feb 2015 12:34:42 +0800 Subject: [PATCH] osd: apply affinity if any affinity is not default --- src/osd/OSDMap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index d4c45110cd4a1..e93040c33c0b2 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1570,6 +1570,7 @@ void OSDMap::_apply_primary_affinity(ps_t seed, if (*p != CRUSH_ITEM_NONE && (*osd_primary_affinity)[*p] != CEPH_OSD_DEFAULT_PRIMARY_AFFINITY) { any = true; + break; } } if (!any) @@ -2370,7 +2371,7 @@ string OSDMap::get_flag_string(unsigned f) if (f & CEPH_OSDMAP_NOTIERAGENT) s += ",notieragent"; if (s.length()) - s = s.erase(0, 1); + s.erase(0, 1); return s; } -- 2.39.5