}
} // namespace
+using std::string;
+using std::string_view;
+using std::stringstream;
+using std::unique_ptr;
+
namespace crimson::admin {
tell_result_t::tell_result_t(int ret, std::string&& err)
#include "crimson/osd/exceptions.h"
#include "crimson/osd/osd.h"
-using crimson::osd::OSD;
-using namespace crimson::common;
-
namespace {
seastar::logger& logger()
{
}
} // namespace
-namespace crimson::admin {
-
+using std::string_view;
+using std::unique_ptr;
+using crimson::osd::OSD;
using crimson::common::local_conf;
+using namespace crimson::common;
+
+namespace crimson::admin {
template <class Hook, class... Args>
std::unique_ptr<AdminSocketHook> make_asok_hook(Args&&... args)
#include "messages/MMonSubscribe.h"
#include "messages/MMonSubscribeAck.h"
+using std::string;
+using std::tuple;
+using std::vector;
+
namespace {
seastar::logger& logger()
{
ceph_tid_t last_mon_command_id = 0;
using command_result_t =
- seastar::future<std::tuple<std::int32_t, string, ceph::bufferlist>>;
+ seastar::future<std::tuple<std::int32_t, std::string, ceph::bufferlist>>;
struct mon_command_t {
ceph::ref_t<MMonCommand> req;
typename command_result_t::promise_type result;
// without dispatching any reset event
virtual void mark_down() = 0;
- virtual void print(ostream& out) const = 0;
+ virtual void print(std::ostream& out) const = 0;
void set_last_keepalive(clock_t::time_point when) {
last_keepalive = when;
virtual ~user_private_t() = default;
};
private:
- unique_ptr<user_private_t> user_private;
+ std::unique_ptr<user_private_t> user_private;
public:
bool has_user_private() const {
return user_private != nullptr;
}
- void set_user_private(unique_ptr<user_private_t> new_user_private) {
+ void set_user_private(std::unique_ptr<user_private_t> new_user_private) {
user_private = std::move(new_user_private);
}
user_private_t &get_user_private() {
}
};
-inline ostream& operator<<(ostream& out, const Connection& conn) {
+inline std::ostream& operator<<(std::ostream& out, const Connection& conn) {
out << "[";
conn.print(out);
out << "]";
return seastar::make_ready_future<>();
} else {
p_blocked = seastar::abort_source();
- return seastar::sleep_abortable(10s, *p_blocked).then([] {
+ return seastar::sleep_abortable(std::chrono::seconds(10),
+ *p_blocked).then([] {
throw std::runtime_error(
"Timeout (10s) in socket_blocker::wait_blocked()");
}).handle_exception_type([] (const seastar::sleep_aborted& e) {
}
ceph_assert(!p_unblocked);
p_unblocked = seastar::abort_source();
- return seastar::sleep_abortable(10s, *p_unblocked).then([] {
+ return seastar::sleep_abortable(std::chrono::seconds(10),
+ *p_unblocked).then([] {
ceph_abort("Timeout (10s) in socket_blocker::block()");
}).handle_exception_type([] (const seastar::sleep_aborted& e) {
// wait done!
auth_server = as;
}
- virtual void print(ostream& out) const = 0;
+ virtual void print(std::ostream& out) const = 0;
virtual SocketPolicy get_policy(entity_type_t peer_type) const = 0;
const uint64_t nonce);
};
-inline ostream& operator<<(ostream& out, const Messenger& msgr) {
+inline std::ostream& operator<<(std::ostream& out, const Messenger& msgr) {
out << "[";
msgr.print(out);
out << "]";
#include "Interceptor.h"
#endif
+using std::ostream;
using namespace crimson::net;
using crimson::common::local_conf;
void mark_down() override;
- void print(ostream& out) const override;
+ void print(std::ostream& out) const override;
/// start a handshake from the client's perspective,
/// only call when SocketConnection first construct
seastar::future<> shutdown() override;
- void print(ostream& out) const override {
+ void print(std::ostream& out) const override {
out << get_myname()
<< "(" << logic_name
<< ") " << get_myaddr();
#include "crimson/common/log.h"
#include "crimson/os/futurized_store.h"
+using std::map;
+using std::set;
+using std::string;
+
namespace {
seastar::logger& logger()
#include "cyan_object.h"
+using std::make_pair;
+
namespace crimson::os
{
}
}
+using std::string;
using crimson::common::local_conf;
namespace crimson::os {
int _setattrs(const coll_t& cid, const ghobject_t& oid,
std::map<std::string,bufferlist>& aset);
int _rm_attr(const coll_t& cid, const ghobject_t& oid,
- string_view name);
+ std::string_view name);
int _create_collection(const coll_t& cid, int bits);
boost::intrusive_ptr<Collection> _get_collection(const coll_t& cid);
};
#include "crimson/os/seastore/onode_manager/staged-fltree/node_extent_manager/seastore.h"
#include "test/crimson/seastore/test_block.h"
+using std::string_view;
+
namespace crimson::os::seastore {
Cache::Cache(SegmentManager &segment_manager) :
#include "crimson/os/seastore/onode_manager.h"
#include "crimson/os/seastore/object_data_handler.h"
+using std::string;
using crimson::common::local_conf;
namespace crimson::os::seastore {
omap_get_values_ret_t omap_list(
CollectionRef ch,
const ghobject_t &oid,
- const std::optional<string> &_start,
+ const std::optional<std::string> &_start,
OMapManager::omap_list_config_t config);
SegmentManagerRef segment_manager;
#include "osd/OSDMap.h"
+using std::set;
+using std::string;
using crimson::common::local_conf;
namespace {
if (failure_pending.count(peer)) {
return false;
}
- auto failed_for = chrono::duration_cast<chrono::seconds>(
+ auto failed_for = std::chrono::duration_cast<std::chrono::seconds>(
now - failed_since).count();
auto osdmap = heartbeat.service.get_osdmap_service().get_map();
auto failure_report =
namespace bpo = boost::program_options;
using config_t = crimson::common::ConfigProxy;
+using std::string;
seastar::logger& logger() {
return crimson::get_logger(ceph_subsys_osd);
#include "auth/Crypto.h"
#include "common/armor.h"
+using std::map;
+using std::string;
+
static inline int execute_osd_op(cls_method_context_t hctx, OSDOp& op)
{
// we can expect the memory under `ret` will be still fine after
static constexpr int TICK_INTERVAL = 1;
}
+using std::make_unique;
+using std::map;
+using std::pair;
+using std::string;
+using std::unique_ptr;
+using std::vector;
+
using crimson::common::local_conf;
using crimson::os::FuturizedStore;
#include "crimson/os/futurized_store.h"
#include "os/Transaction.h"
+using std::string;
using read_errorator = crimson::os::FuturizedStore::read_errorator;
void OSDMeta::create(ceph::os::Transaction& t)
} else {
logger().info("evt epoch is {}, i have {}, will wait", epoch, current);
auto &blocker = waiting_peering.emplace(
- epoch, make_pair(blocker_type, epoch)).first->second;
+ epoch, std::make_pair(blocker_type, epoch)).first->second;
auto fut = blocker.promise.get_shared_future();
if (shard_services) {
return blocker.make_blocking_future(
#include "crimson/osd/pg_recovery.h"
#include "crimson/osd/replicated_recovery_backend.h"
+using std::ostream;
+using std::set;
+using std::string;
+using std::vector;
+
namespace {
seastar::logger& logger() {
return crimson::get_logger(ceph_subsys_osd);
}));
}
- void update_heartbeat_peers(set<int> peers) final {
+ void update_heartbeat_peers(std::set<int> peers) final {
// Not needed yet
}
- void set_probe_targets(const set<pg_shard_t> &probe_set) final {
+ void set_probe_targets(const std::set<pg_shard_t> &probe_set) final {
// Not needed yet
}
void clear_probe_targets() final {
epoch_t get_last_peering_reset() const final {
return peering_state.get_last_peering_reset();
}
- const set<pg_shard_t> &get_acting_recovery_backfill() const {
+ const std::set<pg_shard_t> &get_acting_recovery_backfill() const {
return peering_state.get_acting_recovery_backfill();
}
bool is_backfill_target(pg_shard_t osd) const {
uint64_t min_peer_features() const {
return peering_state.get_min_peer_features();
}
- const map<hobject_t, set<pg_shard_t>>&
+ const std::map<hobject_t, std::set<pg_shard_t>>&
get_missing_loc_shards() const {
return peering_state.get_missing_loc().get_missing_locs();
}
- const map<pg_shard_t, pg_missing_t> &get_shard_missing() const {
+ const std::map<pg_shard_t, pg_missing_t> &get_shard_missing() const {
return peering_state.get_peer_missing();
}
epoch_t get_interval_start_epoch() const {
oid, get_actingset(), v);
}
bool is_degraded_or_backfilling_object(const hobject_t& soid) const;
- const set<pg_shard_t> &get_actingset() const {
+ const std::set<pg_shard_t> &get_actingset() const {
return peering_state.get_actingset();
}
}
}
+using std::runtime_error;
+using std::string;
+using std::string_view;
using crimson::common::local_conf;
std::unique_ptr<PGBackend>
}
}
+using std::make_pair;
+
namespace crimson::osd {
PGMap::PGCreationState::PGCreationState(spg_t pgid) : pgid(pgid) {}
#include "crimson/os/futurized_collection.h"
#include "crimson/os/futurized_store.h"
+using std::string;
+using std::string_view;
// prefix pgmeta_oid keys with _ so that PGLog::read_log_and_missing() can
// easily skip them
using crimson::os::FuturizedStore;
}
}
+using std::map;
+using std::set;
+
void PGRecovery::start_pglogbased_recovery()
{
using PglogBasedRecovery = crimson::osd::PglogBasedRecovery;
const object_stat_sum_t& stat_diff,
bool is_delete);
void on_failed_recover(
- const set<pg_shard_t>& from,
+ const std::set<pg_shard_t>& from,
const hobject_t& soid,
const eversion_t& v);
void on_peer_recover(
}
}
+using std::less;
+using std::map;
+using std::string;
+
RecoveryBackend::interruptible_future<>
ReplicatedRecoveryBackend::recover_object(
const hobject_t& soid,
ceph::bufferlist&& data_included,
ceph::bufferlist&& omap_header,
const std::map<std::string, bufferlist, std::less<>> &attrs,
- std::map<string, bufferlist>&& omap_entries,
+ std::map<std::string, bufferlist>&& omap_entries,
ceph::os::Transaction *t);
void submit_push_complete(
const ObjectRecoveryInfo &recovery_info,
}
}
+using std::vector;
+
namespace crimson::osd {
ShardServices::ShardServices(
std::vector<int> acting;
bool forced = false;
};
- map<pg_t, pg_temp_t> pg_temp_wanted;
- map<pg_t, pg_temp_t> pg_temp_pending;
+ std::map<pg_t, pg_temp_t> pg_temp_wanted;
+ std::map<pg_t, pg_temp_t> pg_temp_pending;
friend std::ostream& operator<<(std::ostream&, const pg_temp_t&);
public:
- void queue_want_pg_temp(pg_t pgid, const vector<int>& want,
+ void queue_want_pg_temp(pg_t pgid, const std::vector<int>& want,
bool forced = false);
void remove_want_pg_temp(pg_t pgid);
void requeue_pg_temp();
// PG Created State
private:
- set<pg_t> pg_created;
+ std::set<pg_t> pg_created;
public:
seastar::future<> send_pg_created(pg_t pgid);
seastar::future<> send_pg_created();