]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: ostream is enough for build_simple*
authorLoic Dachary <loic@dachary.org>
Sun, 12 Jan 2014 12:47:01 +0000 (13:47 +0100)
committerLoic Dachary <loic@dachary.org>
Sun, 12 Jan 2014 16:48:32 +0000 (17:48 +0100)
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 <loic@dachary.org>
src/osd/OSDMap.cc
src/osd/OSDMap.h

index 8982b5107321001249bac48628e24d99c2cd2ee3..244639112cb7983b85cf92c69dc392c575ded9bd 100644 (file)
@@ -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;
 
index 2c16056781c757bfec3b2df36fc55e629b41f425..0725d1e95bdc67d219091f9eb760aea900269025 100644 (file)
@@ -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;