]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson, monmap: limit the scope of the seastar namespace inclusion.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 7 Oct 2021 11:04:12 +0000 (11:04 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 7 Oct 2021 11:20:03 +0000 (11:20 +0000)
More consistency that way. This also enables us to define the usual
`logger()` function without having a clash with `seastar::logger`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/mon/MonMap.cc

index 491fdbb6e1102ef327314380dcf756442684fdbf..12dce76c32b50f37f81189e741d3f1bb235dfa30 100644 (file)
@@ -726,10 +726,9 @@ void MonMap::check_health(health_check_map_t *checks) const
 
 #ifdef WITH_SEASTAR
 
-using namespace seastar;
-
 seastar::future<> MonMap::read_monmap(const std::string& monmap)
 {
+  using namespace seastar;
   return open_file_dma(monmap, open_flags::ro).then([this] (file f) {
     return f.size().then([this, f = std::move(f)](size_t s) {
       return do_with(make_file_input_stream(f), [this, s](input_stream<char>& in) {
@@ -757,7 +756,7 @@ seastar::future<> MonMap::init_with_dns_srv(bool for_mkfs, const std::string& na
   return seastar::net::dns::get_srv_records(
       seastar::net::dns_resolver::srv_proto::tcp,
       service, domain).then([this](seastar::net::dns_resolver::srv_records records) {
-    return parallel_for_each(records, [this](auto record) {
+    return seastar::parallel_for_each(records, [this](auto record) {
       return seastar::net::dns::resolve_name(record.target).then(
           [record,this](seastar::net::inet_address a) {
        // the resolved address does not contain ceph specific info like nonce
@@ -809,7 +808,7 @@ seastar::future<> MonMap::build_monmap(const crimson::common::ConfigProxy& conf,
 {
   // -m foo?
   if (maybe_init_with_mon_host(conf.get_val<std::string>("mon_host"), for_mkfs)) {
-    return make_ready_future<>();
+    return seastar::make_ready_future<>();
   }
 
   // What monitors are in the config file?
@@ -818,7 +817,7 @@ seastar::future<> MonMap::build_monmap(const crimson::common::ConfigProxy& conf,
     throw std::runtime_error(errout.str());
   }
   if (size() > 0) {
-    return make_ready_future<>();
+    return seastar::make_ready_future<>();
   }
   // no info found from conf options lets try use DNS SRV records
   const string srv_name = conf.get_val<std::string>("mon_dns_srv_name");
@@ -834,7 +833,7 @@ seastar::future<> MonMap::build_initial(const crimson::common::ConfigProxy& conf
   // mon_host_override?
   if (maybe_init_with_mon_host(conf.get_val<std::string>("mon_host_override"),
                                for_mkfs)) {
-    return make_ready_future<>();
+    return seastar::make_ready_future<>();
   }
 
   // file?