class CephContext;
-using std::vector;
-using std::string;
-using std::map;
-
namespace ceph {
class Formatter;
}
class Logger;
class ContextQueue;
-static inline void encode(const map<string,bufferptr> *attrset, bufferlist &bl) {
+static inline void encode(const std::map<std::string,ceph::buffer::ptr> *attrset, ceph::buffer::list &bl) {
+ using ceph::encode;
encode(*attrset, bl);
}
// this isn't the best place for these, but...
-void decode_str_str_map_to_bl(bufferlist::const_iterator& p, bufferlist *out);
-void decode_str_set_to_bl(bufferlist::const_iterator& p, bufferlist *out);
+void decode_str_str_map_to_bl(ceph::buffer::list::const_iterator& p, ceph::buffer::list *out);
+void decode_str_set_to_bl(ceph::buffer::list::const_iterator& p, ceph::buffer::list *out);
// Flag bits
typedef uint32_t osflagbits_t;
class ObjectStore {
protected:
- string path;
+ std::string path;
public:
CephContext* cct;
*
* This is invoked once at initialization time.
*
- * @param type type of store. This is a string from the configuration file.
+ * @param type type of store. This is a std::string from the configuration file.
* @param data path (or other descriptor) for data
* @param journal path (or other descriptor) for journal (optional)
* @param flags which filestores should check if applicable
*/
static ObjectStore *create(CephContext *cct,
- const string& type,
- const string& data,
- const string& journal,
+ const std::string& type,
+ const std::string& data,
+ const std::string& journal,
osflagbits_t flags = 0);
/**
*/
static int probe_block_device_fsid(
CephContext *cct,
- const string& path,
+ const std::string& path,
uuid_d *fsid);
/**
* the maximum size of an object, which is typically around 100 MB.
*
* Xattrs are equivalent to the extended attributes of file
- * systems. Xattrs are a set of key/value pairs. Sub-value access
- * is not required. It is possible to enumerate the set of xattrs in
+ * systems. Xattrs are a std::set of key/value pairs. Sub-value access
+ * is not required. It is possible to enumerate the std::set of xattrs in
* key order. At the implementation level, xattrs are used
* exclusively internal to Ceph and the implementer can expect the
* total size of all of the xattrs on an object to be relatively
*
* A collection is simply a grouping of objects. Collections have
* names (coll_t) and can be enumerated in order. Like an
- * individual object, a collection also has a set of xattrs.
+ * individual object, a collection also has a std::set of xattrs.
*
*
*/
* At the implementation level, each mutation primitive (and its
* associated data) can be serialized to a single buffer. That
* serialization, however, does not copy any data, but (using the
- * bufferlist library) will reference the original buffers. This
+ * ceph::buffer::list library) will reference the original buffers. This
* implies that the buffer that contains the data being submitted
* must remain stable until the on_commit callback completes. In
- * practice, bufferlist handles all of this for you and this
+ * practice, ceph::buffer::list handles all of this for you and this
* subtlety is only relevant if you are referencing an existing
* buffer via buffer::raw_static.
*
TransactionData(const TransactionData& other) = default;
TransactionData& operator=(const TransactionData& other) = default;
- void encode(bufferlist& bl) const {
+ void encode(ceph::buffer::list& bl) const {
bl.append((char*)this, sizeof(TransactionData));
}
- void decode(bufferlist::const_iterator &bl) {
+ void decode(ceph::buffer::list::const_iterator &bl) {
bl.copy(sizeof(TransactionData), (char*)this);
}
} __attribute__ ((packed)) ;
private:
TransactionData data;
- map<coll_t, __le32> coll_index;
- map<ghobject_t, __le32> object_index;
+ std::map<coll_t, __le32> coll_index;
+ std::map<ghobject_t, __le32> object_index;
__le32 coll_id {0};
__le32 object_id {0};
- bufferlist data_bl;
- bufferlist op_bl;
+ ceph::buffer::list data_bl;
+ ceph::buffer::list op_bl;
- list<Context *> on_applied;
- list<Context *> on_commit;
- list<Context *> on_applied_sync;
+ std::list<Context *> on_applied;
+ std::list<Context *> on_commit;
+ std::list<Context *> on_applied_sync;
public:
Transaction() = default;
- explicit Transaction(bufferlist::const_iterator &dp) {
+ explicit Transaction(ceph::buffer::list::const_iterator &dp) {
decode(dp);
}
- explicit Transaction(bufferlist &nbl) {
+ explicit Transaction(ceph::buffer::list &nbl) {
auto dp = nbl.cbegin();
decode(dp);
}
Transaction& operator=(const Transaction& other) = default;
// expose object_index for FileStore::Op's benefit
- const map<ghobject_t, __le32>& get_object_index() const {
+ const std::map<ghobject_t, __le32>& get_object_index() const {
return object_index;
}
}
static void collect_contexts(
- vector<Transaction>& t,
+ std::vector<Transaction>& t,
Context **out_on_applied,
Context **out_on_commit,
Context **out_on_applied_sync) {
ceph_assert(out_on_applied);
ceph_assert(out_on_commit);
ceph_assert(out_on_applied_sync);
- list<Context *> on_applied, on_commit, on_applied_sync;
+ std::list<Context *> on_applied, on_commit, on_applied_sync;
for (auto& i : t) {
on_applied.splice(on_applied.end(), i.on_applied);
on_commit.splice(on_commit.end(), i.on_commit);
*out_on_applied_sync = C_Contexts::list_to_context(on_applied_sync);
}
static void collect_contexts(
- vector<Transaction>& t,
- list<Context*> *out_on_applied,
- list<Context*> *out_on_commit,
- list<Context*> *out_on_applied_sync) {
+ std::vector<Transaction>& t,
+ std::list<Context*> *out_on_applied,
+ std::list<Context*> *out_on_commit,
+ std::list<Context*> *out_on_applied_sync) {
ceph_assert(out_on_applied);
ceph_assert(out_on_commit);
ceph_assert(out_on_applied_sync);
}
void _update_op(Op* op,
- vector<__le32> &cm,
- vector<__le32> &om) {
+ std::vector<__le32> &cm,
+ std::vector<__le32> &om) {
switch (op->op) {
case OP_NOP:
}
}
void _update_op_bl(
- bufferlist& bl,
- vector<__le32> &cm,
- vector<__le32> &om) {
+ ceph::buffer::list& bl,
+ std::vector<__le32> &cm,
+ std::vector<__le32> &om) {
for (auto& bp : bl.buffers()) {
ceph_assert(bp.length() % sizeof(Op) == 0);
on_applied_sync.splice(on_applied_sync.end(), other.on_applied_sync);
//append coll_index & object_index
- vector<__le32> cm(other.coll_index.size());
- map<coll_t, __le32>::iterator coll_index_p;
+ std::vector<__le32> cm(other.coll_index.size());
+ std::map<coll_t, __le32>::iterator coll_index_p;
for (coll_index_p = other.coll_index.begin();
coll_index_p != other.coll_index.end();
++coll_index_p) {
cm[coll_index_p->second] = _get_coll_id(coll_index_p->first);
}
- vector<__le32> om(other.object_index.size());
- map<ghobject_t, __le32>::iterator object_index_p;
+ std::vector<__le32> om(other.object_index.size());
+ std::map<ghobject_t, __le32>::iterator object_index_p;
for (object_index_p = other.object_index.begin();
object_index_p != other.object_index.end();
++object_index_p) {
}
//the other.op_bl SHOULD NOT be changes during append operation,
- //we use additional bufferlist to avoid this problem
- bufferlist other_op_bl;
+ //we use additional ceph::buffer::list to avoid this problem
+ ceph::buffer::list other_op_bl;
{
- bufferptr other_op_bl_ptr(other.op_bl.length());
+ ceph::buffer::ptr other_op_bl_ptr(other.op_bl.length());
other.op_bl.copy(0, other.op_bl.length(), other_op_bl_ptr.c_str());
other_op_bl.append(std::move(other_op_bl_ptr));
}
uint64_t get_encoded_bytes_test() {
using ceph::encode;
//layout: data_bl + op_bl + coll_index + object_index + data
- bufferlist bl;
+ ceph::buffer::list bl;
encode(coll_index, bl);
encode(object_index, bl);
uint64_t ops;
char* op_buffer_p;
- bufferlist::const_iterator data_bl_p;
+ ceph::buffer::list::const_iterator data_bl_p;
public:
- vector<coll_t> colls;
- vector<ghobject_t> objects;
+ std::vector<coll_t> colls;
+ std::vector<ghobject_t> objects;
private:
explicit iterator(Transaction *t)
ops = t->data.ops;
op_buffer_p = t->op_bl.c_str();
- map<coll_t, __le32>::iterator coll_index_p;
+ std::map<coll_t, __le32>::iterator coll_index_p;
for (coll_index_p = t->coll_index.begin();
coll_index_p != t->coll_index.end();
++coll_index_p) {
colls[coll_index_p->second] = coll_index_p->first;
}
- map<ghobject_t, __le32>::iterator object_index_p;
+ std::map<ghobject_t, __le32>::iterator object_index_p;
for (object_index_p = t->object_index.begin();
object_index_p != t->object_index.end();
++object_index_p) {
return op;
}
- string decode_string() {
+ std::string decode_string() {
using ceph::decode;
- string s;
+ std::string s;
decode(s, data_bl_p);
return s;
}
- void decode_bp(bufferptr& bp) {
+ void decode_bp(ceph::buffer::ptr& bp) {
using ceph::decode;
decode(bp, data_bl_p);
}
- void decode_bl(bufferlist& bl) {
+ void decode_bl(ceph::buffer::list& bl) {
using ceph::decode;
decode(bl, data_bl_p);
}
- void decode_attrset(map<string,bufferptr>& aset) {
+ void decode_attrset(std::map<std::string,ceph::buffer::ptr>& aset) {
using ceph::decode;
decode(aset, data_bl_p);
}
- void decode_attrset(map<string,bufferlist>& aset) {
+ void decode_attrset(std::map<std::string,ceph::buffer::list>& aset) {
using ceph::decode;
decode(aset, data_bl_p);
}
- void decode_attrset_bl(bufferlist *pbl) {
+ void decode_attrset_bl(ceph::buffer::list *pbl) {
decode_str_str_map_to_bl(data_bl_p, pbl);
}
- void decode_keyset(set<string> &keys){
+ void decode_keyset(std::set<std::string> &keys){
using ceph::decode;
decode(keys, data_bl_p);
}
- void decode_keyset_bl(bufferlist *pbl){
+ void decode_keyset_bl(ceph::buffer::list *pbl){
decode_str_set_to_bl(data_bl_p, pbl);
}
return reinterpret_cast<Op*>(p);
}
__le32 _get_coll_id(const coll_t& coll) {
- map<coll_t, __le32>::iterator c = coll_index.find(coll);
+ std::map<coll_t, __le32>::iterator c = coll_index.find(coll);
if (c != coll_index.end())
return c->second;
return index_id;
}
__le32 _get_object_id(const ghobject_t& oid) {
- map<ghobject_t, __le32>::iterator o = object_index.find(oid);
+ std::map<ghobject_t, __le32>::iterator o = object_index.find(oid);
if (o != object_index.end())
return o->second;
* Note that a 0-length write does not affect the size of the object.
*/
void write(const coll_t& cid, const ghobject_t& oid, uint64_t off, uint64_t len,
- const bufferlist& write_data, uint32_t flags = 0) {
+ const ceph::buffer::list& write_data, uint32_t flags = 0) {
using ceph::encode;
uint32_t orig_len = data_bl.length();
Op* _op = _get_next_op();
data.ops++;
}
/// Set an xattr of an object
- void setattr(const coll_t& cid, const ghobject_t& oid, const char* name, bufferlist& val) {
- string n(name);
+ void setattr(const coll_t& cid, const ghobject_t& oid, const char* name, ceph::buffer::list& val) {
+ std::string n(name);
setattr(cid, oid, n, val);
}
/// Set an xattr of an object
- void setattr(const coll_t& cid, const ghobject_t& oid, const string& s, bufferlist& val) {
+ void setattr(const coll_t& cid, const ghobject_t& oid, const std::string& s, ceph::buffer::list& val) {
using ceph::encode;
Op* _op = _get_next_op();
_op->op = OP_SETATTR;
data.ops++;
}
/// Set multiple xattrs of an object
- void setattrs(const coll_t& cid, const ghobject_t& oid, const map<string,bufferptr>& attrset) {
+ void setattrs(const coll_t& cid, const ghobject_t& oid, const std::map<std::string,ceph::buffer::ptr>& attrset) {
using ceph::encode;
Op* _op = _get_next_op();
_op->op = OP_SETATTRS;
data.ops++;
}
/// Set multiple xattrs of an object
- void setattrs(const coll_t& cid, const ghobject_t& oid, const map<string,bufferlist>& attrset) {
+ void setattrs(const coll_t& cid, const ghobject_t& oid, const std::map<std::string,ceph::buffer::list>& attrset) {
using ceph::encode;
Op* _op = _get_next_op();
_op->op = OP_SETATTRS;
}
/// remove an xattr from an object
void rmattr(const coll_t& cid, const ghobject_t& oid, const char *name) {
- string n(name);
+ std::string n(name);
rmattr(cid, oid, n);
}
/// remove an xattr from an object
- void rmattr(const coll_t& cid, const ghobject_t& oid, const string& s) {
+ void rmattr(const coll_t& cid, const ghobject_t& oid, const std::string& s) {
using ceph::encode;
Op* _op = _get_next_op();
_op->op = OP_RMATTR;
* @param hint - the hint payload, which contains the customized
* data along with the hint type.
*/
- void collection_hint(const coll_t& cid, uint32_t type, const bufferlist& hint) {
+ void collection_hint(const coll_t& cid, uint32_t type, const ceph::buffer::list& hint) {
using ceph::encode;
Op* _op = _get_next_op();
_op->op = OP_COLL_HINT;
void omap_setkeys(
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object to update
- const map<string, bufferlist> &attrset ///< [in] Replacement keys and values
+ const std::map<std::string, ceph::buffer::list> &attrset ///< [in] Replacement keys and values
) {
using ceph::encode;
Op* _op = _get_next_op();
data.ops++;
}
- /// Set keys on an oid omap (bufferlist variant).
+ /// Set keys on an oid omap (ceph::buffer::list variant).
void omap_setkeys(
const coll_t &cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object to update
- const bufferlist &attrset_bl ///< [in] Replacement keys and values
+ const ceph::buffer::list &attrset_bl ///< [in] Replacement keys and values
) {
Op* _op = _get_next_op();
_op->op = OP_OMAP_SETKEYS;
void omap_rmkeys(
const coll_t &cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object from which to remove the omap
- const set<string> &keys ///< [in] Keys to clear
+ const std::set<std::string> &keys ///< [in] Keys to clear
) {
using ceph::encode;
Op* _op = _get_next_op();
void omap_rmkeys(
const coll_t &cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object from which to remove the omap
- const bufferlist &keys_bl ///< [in] Keys to clear
+ const ceph::buffer::list &keys_bl ///< [in] Keys to clear
) {
Op* _op = _get_next_op();
_op->op = OP_OMAP_RMKEYS;
void omap_rmkeyrange(
const coll_t &cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object from which to remove the omap keys
- const string& first, ///< [in] first key in range
- const string& last ///< [in] first key past range, range is [first,last)
+ const std::string& first, ///< [in] first key in range
+ const std::string& last ///< [in] first key past range, range is [first,last)
) {
using ceph::encode;
Op* _op = _get_next_op();
void omap_setheader(
const coll_t &cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object
- const bufferlist &bl ///< [in] Header value
+ const ceph::buffer::list &bl ///< [in] Header value
) {
using ceph::encode;
Op* _op = _get_next_op();
data.ops++;
}
- void encode(bufferlist& bl) const {
+ void encode(ceph::buffer::list& bl) const {
//layout: data_bl + op_bl + coll_index + object_index + data
ENCODE_START(9, 9, bl);
encode(data_bl, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::const_iterator &bl) {
+ void decode(ceph::buffer::list::const_iterator &bl) {
DECODE_START(9, bl);
DECODE_OLDEST(9);
}
void dump(ceph::Formatter *f);
- static void generate_test_instances(list<Transaction*>& o);
+ static void generate_test_instances(std::list<Transaction*>& o);
};
int queue_transaction(CollectionHandle& ch,
Transaction&& t,
TrackedOpRef op = TrackedOpRef(),
ThreadPool::TPHandle *handle = NULL) {
- vector<Transaction> tls;
+ std::vector<Transaction> tls;
tls.push_back(std::move(t));
return queue_transactions(ch, tls, op, handle);
}
virtual int queue_transactions(
- CollectionHandle& ch, vector<Transaction>& tls,
+ CollectionHandle& ch, std::vector<Transaction>& tls,
TrackedOpRef op = TrackedOpRef(),
ThreadPool::TPHandle *handle = NULL) = 0;
return 0;
}
- virtual void get_db_statistics(Formatter *f) { }
- virtual void generate_db_histogram(Formatter *f) { }
- virtual int flush_cache(ostream *os = NULL) { return -1; }
- virtual void dump_perf_counters(Formatter *f) {}
- virtual void dump_cache_stats(Formatter *f) {}
- virtual void dump_cache_stats(ostream& os) {}
+ virtual void get_db_statistics(ceph::Formatter *f) { }
+ virtual void generate_db_histogram(ceph::Formatter *f) { }
+ virtual int flush_cache(std::ostream *os = NULL) { return -1; }
+ virtual void dump_perf_counters(ceph::Formatter *f) {}
+ virtual void dump_cache_stats(ceph::Formatter *f) {}
+ virtual void dump_cache_stats(std::ostream& os) {}
- virtual string get_type() = 0;
+ virtual std::string get_type() = 0;
// mgmt
virtual bool test_mount_in_use() = 0;
virtual bool allows_journal() = 0; //< allows a journal
/// enumerate hardware devices (by 'devname', e.g., 'sda' as in /sys/block/sda)
- virtual int get_devices(std::set<string> *devls) {
+ virtual int get_devices(std::set<std::string> *devls) {
return -EOPNOTSUPP;
}
return true;
}
- virtual string get_default_device_class() {
+ virtual std::string get_default_device_class() {
return is_rotational() ? "hdd" : "ssd";
}
virtual int get_numa_node(
int *numa_node,
- set<int> *nodes,
- set<string> *failed) {
+ std::set<int> *nodes,
+ std::set<std::string> *failed) {
return -EOPNOTSUPP;
}
osd_alert_list_t* alerts = nullptr) = 0;
virtual int pool_statfs(uint64_t pool_id, struct store_statfs_t *buf) = 0;
- virtual void collect_metadata(map<string,string> *pm) { }
+ virtual void collect_metadata(std::map<std::string,string> *pm) { }
/**
* write_meta - write a simple configuration key out-of-band
* A newline is appended.
*
* @param key key name (e.g., "fsid")
- * @param value value (e.g., a uuid rendered as a string)
+ * @param value value (e.g., a uuid rendered as a std::string)
* @returns 0 for success, or an error code
*/
virtual int write_meta(const std::string& key,
* Trailing whitespace is stripped off.
*
* @param key key name
- * @param value pointer to value string
+ * @param value pointer to value std::string
* @returns 0 for success, or an error code
*/
virtual int read_meta(const std::string& key,
virtual CollectionHandle create_new_collection(const coll_t &cid) = 0;
/**
- * set ContextQueue for a collection
+ * std::set ContextQueue for a collection
*
* After that, oncommits of Transaction will queue into commit_queue.
* And osd ShardThread will call oncommits.
*/
virtual bool exists(CollectionHandle& c, const ghobject_t& oid) = 0;
/**
- * set_collection_opts -- set pool options for a collectioninformation for an object
+ * set_collection_opts -- std::set pool options for a collectioninformation for an object
*
* @param cid collection
* @param opts new collection options
* @param oid oid of object
* @param offset location offset of first byte to be read
* @param len number of bytes to be read
- * @param bl output bufferlist
+ * @param bl output ceph::buffer::list
* @param op_flags is CEPH_OSD_OP_FLAG_*
* @returns number of bytes read on success, or negative error code on failure.
*/
const ghobject_t& oid,
uint64_t offset,
size_t len,
- bufferlist& bl,
+ ceph::buffer::list& bl,
uint32_t op_flags = 0) = 0;
/**
- * fiemap -- get extent map of data of an object
+ * fiemap -- get extent std::map of data of an object
*
- * Returns an encoded map of the extents of an object's data portion
- * (map<offset,size>).
+ * Returns an encoded std::map of the extents of an object's data portion
+ * (std::map<offset,size>).
*
* A non-enlightened implementation is free to return the extent (offset, len)
* as the sole extent.
* @param oid oid of object
* @param offset location offset of first byte to be read
* @param len number of bytes to be read
- * @param bl output bufferlist for extent map information.
+ * @param bl output ceph::buffer::list for extent std::map information.
* @returns 0 on success, negative error code on failure.
*/
virtual int fiemap(CollectionHandle& c, const ghobject_t& oid,
- uint64_t offset, size_t len, bufferlist& bl) = 0;
+ uint64_t offset, size_t len, ceph::buffer::list& bl) = 0;
virtual int fiemap(CollectionHandle& c, const ghobject_t& oid,
- uint64_t offset, size_t len, map<uint64_t, uint64_t>& destmap) = 0;
+ uint64_t offset, size_t len, std::map<uint64_t, uint64_t>& destmap) = 0;
/**
* getattr -- get an xattr of an object
* @returns 0 on success, negative error code on failure.
*/
virtual int getattr(CollectionHandle &c, const ghobject_t& oid,
- const char *name, bufferptr& value) = 0;
+ const char *name, ceph::buffer::ptr& value) = 0;
/**
* getattr -- get an xattr of an object
*/
int getattr(
CollectionHandle &c, const ghobject_t& oid,
- const string& name, bufferlist& value) {
- bufferptr bp;
+ const std::string& name, ceph::buffer::list& value) {
+ ceph::buffer::ptr bp;
int r = getattr(c, oid, name.c_str(), bp);
value.push_back(bp);
return r;
* @returns 0 on success, negative error code on failure.
*/
virtual int getattrs(CollectionHandle &c, const ghobject_t& oid,
- map<string,bufferptr>& aset) = 0;
+ std::map<std::string,ceph::buffer::ptr>& aset) = 0;
/**
* getattrs -- get all of the xattrs of an object
* @returns 0 on success, negative error code on failure.
*/
int getattrs(CollectionHandle &c, const ghobject_t& oid,
- map<string,bufferlist>& aset) {
- map<string,bufferptr> bmap;
+ std::map<std::string,ceph::buffer::list>& aset) {
+ std::map<std::string,ceph::buffer::ptr> bmap;
int r = getattrs(c, oid, bmap);
- for (map<string,bufferptr>::iterator i = bmap.begin();
- i != bmap.end();
- ++i) {
+ for (auto i = bmap.begin(); i != bmap.end(); ++i) {
aset[i->first].append(i->second);
}
return r;
/**
* list_collections -- get all of the collections known to this ObjectStore
*
- * @param ls list of the collections in sorted order.
+ * @param ls std::list of the collections in sorted order.
* @returns 0 on success, negative error code on failure.
*/
- virtual int list_collections(vector<coll_t>& ls) = 0;
+ virtual int list_collections(std::vector<coll_t>& ls) = 0;
/**
* does a collection exist?
* return the number of significant bits of the coll_t::pgid.
*
* This should return what the last create_collection or split_collection
- * set. A legacy backend may return -EAGAIN if the value is unavailable
+ * std::set. A legacy backend may return -EAGAIN if the value is unavailable
* (because we upgraded from an older version, e.g., FileStore).
*/
virtual int collection_bits(CollectionHandle& c) = 0;
/**
- * list contents of a collection that fall in the range [start, end) and no more than a specified many result
+ * std::list contents of a collection that fall in the range [start, end) and no more than a specified many result
*
* @param c collection
* @param start list object that sort >= this value
virtual int collection_list(CollectionHandle &c,
const ghobject_t& start, const ghobject_t& end,
int max,
- vector<ghobject_t> *ls, ghobject_t *next) = 0;
+ std::vector<ghobject_t> *ls, ghobject_t *next) = 0;
/// OMAP
virtual int omap_get(
CollectionHandle &c, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
- bufferlist *header, ///< [out] omap header
- map<string, bufferlist> *out /// < [out] Key to value map
+ ceph::buffer::list *header, ///< [out] omap header
+ std::map<std::string, ceph::buffer::list> *out /// < [out] Key to value std::map
) = 0;
/// Get omap header
virtual int omap_get_header(
CollectionHandle &c, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
- bufferlist *header, ///< [out] omap header
+ ceph::buffer::list *header, ///< [out] omap header
bool allow_eio = false ///< [in] don't assert on eio
) = 0;
virtual int omap_get_keys(
CollectionHandle &c, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
- set<string> *keys ///< [out] Keys defined on oid
+ std::set<std::string> *keys ///< [out] Keys defined on oid
) = 0;
/// Get key values
virtual int omap_get_values(
CollectionHandle &c, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
- const set<string> &keys, ///< [in] Keys to get
- map<string, bufferlist> *out ///< [out] Returned keys and values
+ const std::set<std::string> &keys, ///< [in] Keys to get
+ std::map<std::string, ceph::buffer::list> *out ///< [out] Returned keys and values
) = 0;
/// Filters keys into out which are defined on oid
virtual int omap_check_keys(
CollectionHandle &c, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
- const set<string> &keys, ///< [in] Keys to check
- set<string> *out ///< [out] Subset of keys defined on oid
+ const std::set<std::string> &keys, ///< [in] Keys to check
+ std::set<std::string> *out ///< [out] Subset of keys defined on oid
) = 0;
/**
virtual int flush_journal() { return -EOPNOTSUPP; }
- virtual int dump_journal(ostream& out) { return -EOPNOTSUPP; }
+ virtual int dump_journal(std::ostream& out) { return -EOPNOTSUPP; }
- virtual int snapshot(const string& name) { return -EOPNOTSUPP; }
+ virtual int snapshot(const std::string& name) { return -EOPNOTSUPP; }
/**
* Set and get internal fsid for this instance. No external data is modified
WRITE_CLASS_ENCODER(ObjectStore::Transaction)
WRITE_CLASS_ENCODER(ObjectStore::Transaction::TransactionData)
-ostream& operator<<(ostream& out, const ObjectStore::Transaction& tx);
+std::ostream& operator<<(std::ostream& out, const ObjectStore::Transaction& tx);
#endif