*/
uint64_t get_up_osd_features() const;
- void get_upmap_pgs(vector<pg_t> *upmap_pgs) const;
+ void get_upmap_pgs(std::vector<pg_t> *upmap_pgs) const;
bool check_pg_upmaps(
CephContext *cct,
- const vector<pg_t>& to_check,
- vector<pg_t> *to_cancel,
- map<pg_t, mempool::osdmap::vector<pair<int,int>>> *to_remap) const;
+ const std::vector<pg_t>& to_check,
+ std::vector<pg_t> *to_cancel,
+ std::map<pg_t, mempool::osdmap::vector<std::pair<int,int>>> *to_remap) const;
void clean_pg_upmaps(
CephContext *cct,
Incremental *pending_inc,
- const vector<pg_t>& to_cancel,
- const map<pg_t, mempool::osdmap::vector<pair<int,int>>>& to_remap) const;
+ const std::vector<pg_t>& to_cancel,
+ const std::map<pg_t, mempool::osdmap::vector<std::pair<int,int>>>& to_remap) const;
bool clean_pg_upmaps(CephContext *cct, Incremental *pending_inc) const;
int apply_incremental(const Incremental &inc);
pg_upmap_items.count(pg);
}
- bool check_full(const set<pg_shard_t> &missing_on) const {
+ bool check_full(const std::set<pg_shard_t> &missing_on) const {
for (auto shard : missing_on) {
if (get_state(shard.osd) & CEPH_OSD_FULL)
return true;
}
// child must implement either form of process
- virtual void process(const vector<pg_t>& pgs) = 0;
+ virtual void process(const std::vector<pg_t>& pgs) = 0;
virtual void process(int64_t poolid, unsigned ps_begin, unsigned ps_end) = 0;
virtual void complete() = 0;
Job *job;
int64_t pool;
unsigned begin, end;
- vector<pg_t> pgs;
+ std::vector<pg_t> pgs;
- Item(Job *j, vector<pg_t> pgs) : job(j), pgs(pgs) {}
+ Item(Job *j, std::vector<pg_t> pgs) : job(j), pgs(pgs) {}
Item(Job *j, int64_t p, unsigned b, unsigned e)
: job(j),
pool(p),
void queue(
Job *job,
unsigned pgs_per_item,
- const vector<pg_t>& input_pgs);
+ const std::vector<pg_t>& input_pgs);
void drain() {
wq.drain();
: Job(osdmap), mapping(m) {
mapping->_start(*osdmap);
}
- void process(const vector<pg_t>& pgs) override {}
+ void process(const std::vector<pg_t>& pgs) override {}
void process(int64_t pool, unsigned ps_begin, unsigned ps_end) override {
mapping->_update_range(*osdmap, pool, ps_begin, ps_end);
}
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
- *
+ *
*/
#ifndef CEPH_OSD_TYPES_H
uint32_t front_max[3];
uint32_t front_last;
};
- map<int, Interfaces> hb_pingtime; ///< map of osd id to Interfaces
+ std::map<int, Interfaces> hb_pingtime; ///< map of osd id to Interfaces
osd_stat_t() : snap_trim_queue_len(0), num_snap_trimming(0),
num_shards_repaired(0) {}
void dump(ceph::Formatter *f) const;
static void generate_test_instances(std::list<pg_lease_t*>& o);
- friend ostream& operator<<(ostream& out, const pg_lease_t& l) {
+ friend std::ostream& operator<<(std::ostream& out, const pg_lease_t& l) {
return out << "pg_lease(ru " << l.readable_until
<< " ub " << l.readable_until_ub
<< " int " << l.interval << ")";
void dump(ceph::Formatter *f) const;
static void generate_test_instances(std::list<pg_lease_ack_t*>& o);
- friend ostream& operator<<(ostream& out, const pg_lease_ack_t& l) {
+ friend std::ostream& operator<<(std::ostream& out, const pg_lease_ack_t& l) {
return out << "pg_lease_ack(ruub " << l.readable_until_ub << ")";
}
};
* finally, clean_offsets becomes {[5~10], [30~10]}
*/
void trim();
- friend ostream& operator<<(ostream& out, const ObjectCleanRegions& ocr);
+ friend std::ostream& operator<<(std::ostream& out, const ObjectCleanRegions& ocr);
public:
ObjectCleanRegions() : new_object(false), clean_omap(true) {
clean_offsets.insert(0, (uint64_t)-1);
bool omap_is_dirty() const;
bool object_is_exist() const;
- void encode(bufferlist &bl) const;
- void decode(bufferlist::const_iterator &bl);
- void dump(Formatter *f) const;
- static void generate_test_instances(list<ObjectCleanRegions*>& o);
+ void encode(ceph::buffer::list &bl) const;
+ void decode(ceph::buffer::list::const_iterator &bl);
+ void dump(ceph::Formatter *f) const;
+ static void generate_test_instances(std::list<ObjectCleanRegions*>& o);
};
WRITE_CLASS_ENCODER(ObjectCleanRegions)
-ostream& operator<<(ostream& out, const ObjectCleanRegions& ocr);
+std::ostream& operator<<(std::ostream& out, const ObjectCleanRegions& ocr);
struct OSDOp {
struct pg_log_op_return_item_t {
int32_t rval;
- bufferlist bl;
- void encode(bufferlist& p) const {
+ ceph::buffer::list bl;
+ void encode(ceph::buffer::list& p) const {
using ceph::encode;
encode(rval, p);
encode(bl, p);
}
- void decode(bufferlist::const_iterator& p) {
+ void decode(ceph::buffer::list::const_iterator& p) {
using ceph::decode;
decode(rval, p);
decode(bl, p);
}
- void dump(Formatter *f) const {
+ void dump(ceph::Formatter *f) const {
f->dump_int("rval", rval);
f->dump_unsigned("bl_length", bl.length());
}
const pg_log_op_return_item_t& rhs) {
return !(lhs == rhs);
}
- friend ostream& operator<<(ostream& out, const pg_log_op_return_item_t& i) {
+ friend std::ostream& operator<<(std::ostream& out, const pg_log_op_return_item_t& i) {
return out << "r=" << i.rval << "+" << i.bl.length() << "b";
}
};
utime_t mtime; // this is the _user_ mtime, mind you
int32_t return_code; // only stored for ERRORs for dup detection
- vector<pg_log_op_return_item_t> op_returns;
+ std::vector<pg_log_op_return_item_t> op_returns;
__s32 op;
bool invalid_hash; // only when decoding sobject_t based entries
version_t user_version; // the user version for this entry
int32_t return_code; // only stored for ERRORs for dup detection
- vector<pg_log_op_return_item_t> op_returns;
+ std::vector<pg_log_op_return_item_t> op_returns;
pg_log_dup_t()
: user_version(0), return_code(0)
// prefix pgmeta_oid keys with _ so that PGLog::read_log_and_missing() can
// easily skip them
-static const string_view infover_key = "_infover"sv;
-static const string_view info_key = "_info"sv;
-static const string_view biginfo_key = "_biginfo"sv;
-static const string_view epoch_key = "_epoch"sv;
-static const string_view fastinfo_key = "_fastinfo"sv;
+static const std::string_view infover_key = "_infover";
+static const std::string_view info_key = "_info";
+static const std::string_view biginfo_key = "_biginfo";
+static const std::string_view epoch_key = "_epoch";
+static const std::string_view fastinfo_key = "_fastinfo";
static const __u8 pg_latest_struct_v = 10;
// v10 is the new past_intervals encoding
int prepare_info_keymap(
CephContext* cct,
- map<string,bufferlist> *km,
- string *key_to_remove,
+ std::map<std::string,ceph::buffer::list> *km,
+ std::string *key_to_remove,
epoch_t epoch,
pg_info_t &info,
pg_info_t &last_written_info,
class PGLSPlainFilter : public PGLSFilter {
std::string val;
public:
- int init(ceph::bufferlist::const_iterator ¶ms) override;
+ int init(ceph::buffer::list::const_iterator ¶ms) override;
~PGLSPlainFilter() override {}
bool filter(const hobject_t& obj,
- const ceph::bufferlist& xattr_data) const override;
+ const ceph::buffer::list& xattr_data) const override;
};