From: Loic Dachary Date: Sun, 12 Jan 2014 12:47:01 +0000 (+0100) Subject: osd: ostream is enough for build_simple* X-Git-Tag: v0.77~26^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=76765503fa6df273dbfaf784bd8eeab18b44c65d;p=ceph.git osd: ostream is enough for build_simple* There is no need to specialize the argument into stringstream. It is replaced by a ostream which is convenient to display errors directly to cerr if appropriate. Signed-off-by: Loic Dachary --- diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 8982b5107321..244639112cb7 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1964,7 +1964,7 @@ int OSDMap::_build_crush_types(CrushWrapper& crush) } int OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush, - int nosd, stringstream *ss) + int nosd, ostream *ss) { crush.create(); @@ -2007,7 +2007,7 @@ int OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush, int OSDMap::build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& crush, - stringstream *ss) + ostream *ss) { const md_config_t *conf = cct->_conf; diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 2c16056781c7..0725d1e95bdc 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -622,10 +622,10 @@ public: int num_osd, int pg_bits, int pgp_bits); static int _build_crush_types(CrushWrapper& crush); static int build_simple_crush_map(CephContext *cct, CrushWrapper& crush, - int num_osd, stringstream *ss); + int num_osd, ostream *ss); static int build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& crush, - stringstream *ss); + ostream *ss); bool crush_ruleset_in_use(int ruleset) const;