class Dir {
public:
Inode *parent_inode; // my inode
- hash_map<nstring, Dentry*> dentries;
+ hash_map<string, Dentry*> dentries;
- __u64 release_count;
+ uint64_t release_count;
Dir(Inode* in) : release_count(0) { parent_inode = in; }
bool _write_will_block();
int _touch(coll_t cid, pobject_t oid);
- int _write(coll_t cid, pobject_t oid, __u64 off, size_t len, const bufferlist& bl);
- void _trim_from_cache(pobject_t oid, __u64 off, size_t len);
- int _truncate(coll_t cid, pobject_t oid, __u64 size);
- int _zero(coll_t cid, pobject_t oid, __u64 offset, size_t length);
+ int _write(coll_t cid, pobject_t oid, uint64_t off, size_t len, const bufferlist& bl);
+ void _trim_from_cache(pobject_t oid, uint64_t off, size_t len);
+ int _truncate(coll_t cid, pobject_t oid, uint64_t size);
+ int _zero(coll_t cid, pobject_t oid, uint64_t offset, size_t length);
int _remove(coll_t cid, pobject_t oid);
int _clone(coll_t cid, pobject_t from, pobject_t to);
- int _clone_range(coll_t cid, pobject_t from, pobject_t to, __u64 off, __u64 len);
+ int _clone_range(coll_t cid, pobject_t from, pobject_t to, uint64_t off, uint64_t len);
int _setattr(pobject_t oid, const char *name, const void *value, size_t size);
- int _setattrs(pobject_t oid, map<nstring,bufferptr>& attrset);
+ int _setattrs(pobject_t oid, map<string,bufferptr>& attrset);
int _rmattr(pobject_t oid, const char *name);
bool _collection_exists(coll_t c);
int _collection_list(coll_t c, vector<pobject_t>& o);
// onode
set<coll_t> collections;
- map<nstring, bufferptr> attr;
+ map<string, bufferptr> attr;
map<block_t, ExtentCsum> extent_map;
- interval_set<__u64> bad_byte_extents;
+ interval_set<uint64_t> bad_byte_extents;
interval_set<block_t> uncommitted;
}
void Locker::process_cap_update(MDRequest *mdr, client_t client,
- inodeno_t ino, __u64 cap_id, int caps, int wanted,
+ inodeno_t ino, uint64_t cap_id, int caps, int wanted,
int seq, int issue_seq, int mseq,
- const nstring& dname)
+ const string& dname)
{
CInode *in = mdcache->get_inode(ino);
if (!in)
// caps
void process_cap_update(MDRequest *mdr, client_t client,
- inodeno_t ino, __u64 cap_id, int caps, int wanted,
+ inodeno_t ino, uint64_t cap_id, int caps, int wanted,
int seq, int issue_seq, int mseq,
- const nstring& dname);
+ const string& dname);
void kick_cap_releases(MDRequest *mdr);
protected:
struct MAuthReply : public Message {
__u32 protocol;
__s32 result;
- __u64 global_id; // if zero, meaningless
+ uint64_t global_id; // if zero, meaningless
- cstring result_msg;
+ string result_msg;
bufferlist result_bl;
MAuthReply() : Message(CEPH_MSG_AUTH_REPLY), protocol(0), result(0) {}
- MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = 0) :
- MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, __u64 gid=0, const char *msg = "") :
++ MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = "") :
Message(CEPH_MSG_AUTH_REPLY),
protocol(p), result(r), global_id(gid),
result_msg(msg) {
h.first = sf;
h.last = sl;
}
- MClientLease(int ac, ceph_seq_t seq, int m, uint64_t i, uint64_t sf, uint64_t sl, const nstring& d) :
- MClientLease(int ac, ceph_seq_t seq, int m, __u64 i, __u64 sf, __u64 sl, const string& d) :
++ MClientLease(int ac, ceph_seq_t seq, int m, uint64_t i, uint64_t sf, uint64_t sl, const string& d) :
Message(CEPH_MSG_CLIENT_LEASE),
dname(d) {
h.action = ac;
eversion_t pg_trim_to; // primary->replica: trim to here
osd_peer_stat_t peer_stat;
- map<nstring,bufferptr> attrset;
+ map<string,bufferptr> attrset;
- interval_set<__u64> data_subset;
- map<sobject_t, interval_set<__u64> > clone_subsets;
+ interval_set<uint64_t> data_subset;
+ map<sobject_t, interval_set<uint64_t> > clone_subsets;
virtual void decode_payload() {
bufferlist::iterator p = payload.begin();
// index pool names
name_pool.clear();
- for (map<int,nstring>::iterator i = pool_name.begin(); i != pool_name.end(); i++)
+ for (map<int,string>::iterator i = pool_name.begin(); i != pool_name.end(); i++)
name_pool[i->second] = i->first;
+
+ calc_num_osds();
}
{
// read data+attrs
bufferlist bl;
- map<nstring,bufferptr> attrset;
+ map<string,bufferptr> attrset;
- __u64 size;
+ uint64_t size;
if (data_subset.size() || clone_subsets.size()) {
struct stat st;
struct ScrubMap {
struct object {
sobject_t poid;
- __u64 size;
+ uint64_t size;
- map<nstring,bufferptr> attrs;
+ map<string,bufferptr> attrs;
void encode(bufferlist& bl) const {
__u8 struct_v = 1;
public:
// this goes at the head of the log "file".
struct Header {
- __s64 trimmed_pos;
- __s64 expire_pos;
- __s64 read_pos;
- __s64 write_pos;
+ int64_t trimmed_pos;
+ int64_t expire_pos;
+ int64_t read_pos;
+ int64_t write_pos;
- nstring magic;
+ string magic;
ceph_file_layout layout;
- Header(const char *m=0) :
+ Header(const char *m="") :
trimmed_pos(0), expire_pos(0), read_pos(0), write_pos(0),
magic(m) { }