libmon.a libmds.a libosdc.a libosd.a libclient.a \
libos.a libebofs.a
-noinst_LIBRARIES += libcrush_so.a libcephclient_so.a
+noinst_LIBRARIES += libcrush_so.a #libcephclient_so.a
# extra bits
EXTRA_DIST = mkcephfs.sh mkfs.sh restart.sh startnew.sh stop.sh
if (in->dir) {
dout(1) << " dir size " << in->dir->dentries.size() << dendl;
//for (hash_map<const char*, Dentry*, hash<const char*>, eqstr>::iterator it = in->dir->dentries.begin();
- for (hash_map<string, Dentry*>::iterator it = in->dir->dentries.begin();
+ for (hash_map<nstring, Dentry*>::iterator it = in->dir->dentries.begin();
it != in->dir->dentries.end();
it++) {
dout(1) << " dn " << it->first << " ref " << it->second->ref << dendl;
public:
Inode *parent_inode; // my inode
//hash_map<const char*, Dentry*, hash<const char*>, eqstr> dentries;
- hash_map<string, Dentry*> dentries;
+ hash_map<nstring, Dentry*> dentries;
Dir(Inode* in) { parent_inode = in; }
#include "buffer.h"
#include "encoding.h"
+#include "nstring.h"
class filepath {
inodeno_t ino; // base inode. ino=0 implies pure relative path.
path += s;
bits.push_back(s);
}
+ void push_dentry(const nstring &ns) {
+ string s = ns.c_str();
+ push_dentry(s);
+ }
+ void push_dentry(const char *cs) {
+ string s = cs;
+ push_dentry(s);
+ }
void append(const filepath& a) {
assert(a.pure_relative());
for (unsigned i=0; i<a.depth(); i++)
--- /dev/null
+#ifndef _CEPH_NSTRING
+#define _CEPH_NSTRING
+
+/*
+ * nstring - a simple string class
+ *
+ * the key difference between this and std::string is that the string
+ * is stored with a null terminator, providing an efficient c_str()
+ * method.
+ */
+class nstring {
+ private:
+ int _len;
+ char *_data;
+
+ public:
+ nstring() : _len(0), _data(0) {}
+ nstring(int l, const char *d=0) : _len(l) {
+ _data = new char[_len + 1];
+ if (d) {
+ memcpy(_data, d, l);
+ _data[l] = 0;
+ }
+ }
+ nstring(const char *s) {
+ _len = strlen(s);
+ _data = new char[_len + 1];
+ memcpy(_data, s, _len);
+ _data[_len] = 0;
+ }
+ nstring(const string &s) {
+ _len = s.length();
+ _data = new char[_len + 1];
+ memcpy(_data, s.data(), _len);
+ _data[_len] = 0;
+ }
+ nstring(const nstring &s) {
+ _len = s.length();
+ _data = new char[_len + 1];
+ memcpy(_data, s.data(), _len);
+ _data[_len] = 0;
+ }
+ ~nstring() {
+ if (_data) delete[] _data;
+ }
+
+ // accessors
+ int length() const { return _len; }
+ bool empty() const { return _len == 0; }
+ const char *c_str() const { return _data; }
+ const char *data() const { return _data; }
+
+ //const char *operator() const { return _data; }
+
+ // modifiers
+ const nstring& operator=(const char *s) {
+ if (_data) delete[] _data;
+ _len = strlen(s);
+ _data = new char[_len + 1];
+ memcpy(_data, s, _len);
+ _data[_len] = 0;
+ return *this;
+ }
+ const nstring& operator=(const string &s) {
+ if (_data) delete[] _data;
+ _len = s.length();
+ _data = new char[_len + 1];
+ memcpy(_data, s.data(), _len);
+ _data[_len] = 0;
+ return *this;
+ }
+ const nstring& operator=(const nstring &ns) {
+ if (_data) delete[] _data;
+ _len = ns.length();
+ _data = new char[_len + 1];
+ memcpy(_data, ns.data(), _len);
+ _data[_len] = 0;
+ return *this;
+ }
+ void swap(nstring &other) {
+ int tlen = _len;
+ char *tdata = _data;
+ _len = other._len;
+ _data = other._data;
+ other._len = tlen;
+ other._data = tdata;
+ }
+ void clear() {
+ _len = 0;
+ delete _data;
+ _data = 0;
+ }
+
+ // encoding
+ void encode(bufferlist &bl) const {
+ __u32 l = _len;
+ ::encode(l, bl);
+ bl.append(_data, _len);
+ }
+ void decode(bufferlist::iterator &bl) {
+ if (_data) delete[] _data;
+ __u32 l;
+ ::decode(l, bl);
+ _len = l;
+ _data = new char[_len + 1];
+ bl.copy(_len, _data);
+ _data[_len] = 0;
+ }
+};
+WRITE_CLASS_ENCODER(nstring)
+
+static inline bool operator==(const nstring &l, const nstring &r) {
+ return l.length() == r.length() && memcmp(l.data(), r.data(), l.length()) == 0;
+}
+static inline bool operator!=(const nstring &l, const nstring &r) {
+ return l.length() != r.length() || memcmp(l.data(), r.data(), l.length()) != 0;
+}
+static inline bool operator<(const nstring &l, const nstring &r) {
+ return strcmp(l.c_str(), r.c_str()) < 0;
+}
+static inline bool operator<=(const nstring &l, const nstring &r) {
+ return strcmp(l.c_str(), r.c_str()) <= 0;
+}
+static inline bool operator>(const nstring &l, const nstring &r) {
+ return strcmp(l.c_str(), r.c_str()) > 0;
+}
+static inline bool operator>=(const nstring &l, const nstring &r) {
+ return strcmp(l.c_str(), r.c_str()) >= 0;
+}
+
+static inline ostream& operator<<(ostream &out, const nstring &s) {
+ return out << s.c_str();
+}
+
+namespace __gnu_cxx {
+ template<> struct hash< nstring >
+ {
+ size_t operator()( const nstring& x ) const
+ {
+ static hash<const char*> H;
+ return H(x.c_str());
+ }
+ };
+}
+
+#endif
Anchor() : dn_hash(0), nref(0) {}
Anchor(inodeno_t i, inodeno_t di, __u32 hash, int nr=0) :
ino(i), dirino(di), dn_hash(hash), nref(nr) { }
- Anchor(inodeno_t i, inodeno_t di, const string &dname, int nr=0) :
+ Anchor(inodeno_t i, inodeno_t di, const nstring &dname, int nr=0) :
ino(i), dirino(di),
dn_hash(ceph_full_name_hash(dname.data(), dname.length())),
nref(nr) { }
s = "???";
}
s += "/";
- s += name;
+ s.append(name.data(), name.length());
}
void CDentry::make_path(filepath& fp)
#include "include/lru.h"
#include "include/xlist.h"
#include "include/filepath.h"
+#include "include/nstring.h"
#include "mdstypes.h"
#include "SimpleLock.h"
}
protected:
- string name;
+ nstring name;
inodeno_t remote_ino; // if remote dentry
unsigned char remote_d_type;
dir_offset(0),
auth_pins(0), nested_auth_pins(0), nested_anchors(0),
lock(this, CEPH_LOCK_DN, WAIT_LOCK_OFFSET) { }
- CDentry(const string& n, CInode *in) :
+ CDentry(const nstring& n, CInode *in) :
name(n),
remote_ino(0), remote_d_type(0),
inode(in), dir(0),
dir_offset(0),
auth_pins(0), nested_auth_pins(0), nested_anchors(0),
lock(this, CEPH_LOCK_DN, WAIT_LOCK_OFFSET) { }
- CDentry(const string& n, inodeno_t ino, unsigned char dt, CInode *in=0) :
+ CDentry(const nstring& n, inodeno_t ino, unsigned char dt, CInode *in=0) :
name(n),
remote_ino(ino), remote_d_type(dt),
inode(in), dir(0),
CInode *get_inode() const { return inode; }
CDir *get_dir() const { return dir; }
- const string& get_name() const { return name; }
+ const nstring& get_name() const { return name; }
inodeno_t get_ino();
off_t get_dir_offset() { return dir_offset; }
class CDentryDiscover {
- string dname;
+ nstring dname;
__s32 replica_nonce;
__s32 lockstate;
__s64 dir_offset;
remote_ino(dn->get_remote_ino()), remote_d_type(dn->get_remote_d_type()) { }
CDentryDiscover(bufferlist::iterator &p) { decode(p); }
- string& get_dname() { return dname; }
+ nstring& get_dname() { return dname; }
int get_nonce() { return replica_nonce; }
bool is_remote() { return remote_ino ? true:false; }
inodeno_t get_remote_ino() { return remote_ino; }
* linking fun
*/
-CDentry* CDir::add_null_dentry(const string& dname)
+CDentry* CDir::add_null_dentry(const nstring& dname)
{
// foreign
assert(lookup(dname) == 0);
dn->version = get_projected_version();
// add to dir
- assert(items.count(dn->name) == 0);
+ assert(items.count(dn->name.c_str()) == 0);
//assert(null_items.count(dn->name) == 0);
- items[dn->name] = dn;
+ items[dn->name.c_str()] = dn;
nnull++;
dout(12) << "add_null_dentry " << *dn << dendl;
}
-CDentry* CDir::add_primary_dentry(const string& dname, CInode *in)
+CDentry* CDir::add_primary_dentry(const nstring& dname, CInode *in)
{
// primary
assert(lookup(dname) == 0);
dn->version = get_projected_version();
// add to dir
- assert(items.count(dn->name) == 0);
+ assert(items.count(dn->name.c_str()) == 0);
//assert(null_items.count(dn->name) == 0);
- items[dn->name] = dn;
+ items[dn->name.c_str()] = dn;
link_inode_work( dn, in );
dout(12) << "add_primary_dentry " << *dn << dendl;
return dn;
}
-CDentry* CDir::add_remote_dentry(const string& dname, inodeno_t ino, unsigned char d_type)
+CDentry* CDir::add_remote_dentry(const nstring& dname, inodeno_t ino, unsigned char d_type)
{
// foreign
assert(lookup(dname) == 0);
dn->version = get_projected_version();
// add to dir
- assert(items.count(dn->name) == 0);
+ assert(items.count(dn->name.c_str()) == 0);
//assert(null_items.count(dn->name) == 0);
- items[dn->name] = dn;
+ items[dn->name.c_str()] = dn;
nitems++;
dout(12) << "add_remote_dentry " << *dn << dendl;
}
// remove from list
- assert(items.count(dn->name) == 1);
- items.erase(dn->name);
+ assert(items.count(dn->name.c_str()) == 1);
+ items.erase(dn->name.c_str());
// adjust dirty counter?
if (dn->state_test(CDentry::STATE_DIRTY))
{
dout(15) << "steal_dentry " << *dn << dendl;
- items[dn->name] = dn;
+ items[dn->name.c_str()] = dn;
- dn->dir->items.erase(dn->name);
+ dn->dir->items.erase(dn->name.c_str());
if (dn->dir->items.empty())
dn->dir->put(PIN_CHILD);
* WAITING
*/
-void CDir::add_dentry_waiter(const string& dname, Context *c)
+void CDir::add_dentry_waiter(const nstring& dname, Context *c)
{
if (waiting_on_dentry.empty())
get(PIN_DNWAITER);
dout(10) << "add_dentry_waiter dentry " << dname << " " << c << " on " << *this << dendl;
}
-void CDir::take_dentry_waiting(const string& dname, list<Context*>& ls)
+void CDir::take_dentry_waiting(const nstring& dname, list<Context*>& ls)
{
if (waiting_on_dentry.empty()) return;
if (waiting_on_dentry.count(dname) == 0) return;
void CDir::take_sub_waiting(list<Context*>& ls)
{
dout(10) << "take_sub_waiting" << dendl;
- for (hash_map<string, list<Context*> >::iterator p = waiting_on_dentry.begin();
+ for (hash_map<nstring, list<Context*> >::iterator p = waiting_on_dentry.begin();
p != waiting_on_dentry.end();
++p)
ls.splice(ls.end(), p->second);
{
if (mask & WAIT_DENTRY) {
// take each each dentry waiter
- hash_map<string, list<Context*> >::iterator it =
+ hash_map<nstring, list<Context*> >::iterator it =
waiting_on_dentry.begin();
while (it != waiting_on_dentry.end()) {
take_dentry_waiting((it++)->first, ls); // not post-inc
public:
//typedef hash_map<string, CDentry*> map_t; // there is a bug somewhere, valgrind me.
- typedef map<string, CDentry*> map_t;
+ typedef map<const char *, CDentry*, ltstr> map_t;
protected:
// contents
// -- dentries and inodes --
public:
- CDentry* lookup(const string& n) {
- map_t::iterator iter = items.find(n);
+ CDentry* lookup(const string& s) {
+ nstring ns(s);
+ return lookup(ns);
+ }
+ CDentry* lookup(const nstring& ns) {
+ map_t::iterator iter = items.find(ns.c_str());
if (iter == items.end())
return 0;
else
return iter->second;
}
- CDentry* add_null_dentry(const string& dname);
- CDentry* add_primary_dentry(const string& dname, CInode *in);
- CDentry* add_remote_dentry(const string& dname, inodeno_t ino, unsigned char d_type);
+ CDentry* add_null_dentry(const nstring& dname);
+ CDentry* add_primary_dentry(const nstring& dname, CInode *in);
+ CDentry* add_remote_dentry(const nstring& dname, inodeno_t ino, unsigned char d_type);
void remove_dentry( CDentry *dn ); // delete dentry
void link_remote_inode( CDentry *dn, inodeno_t ino, unsigned char d_type);
void link_remote_inode( CDentry *dn, CInode *in );
// -- waiters --
protected:
- hash_map< string, list<Context*> > waiting_on_dentry;
+ hash_map< nstring, list<Context*> > waiting_on_dentry;
hash_map< inodeno_t, list<Context*> > waiting_on_ino;
public:
bool is_waiting_for_dentry(const string& dn) {
return waiting_on_dentry.count(dn);
}
- void add_dentry_waiter(const string& dentry, Context *c);
- void take_dentry_waiting(const string& dentry, list<Context*>& ls);
+ void add_dentry_waiter(const nstring& dentry, Context *c);
+ void take_dentry_waiting(const nstring& dentry, list<Context*>& ls);
bool is_waiting_for_ino(inodeno_t ino) {
return waiting_on_ino.count(ino);
// dirfrags
-frag_t CInode::pick_dirfrag(const string& dn)
+frag_t CInode::pick_dirfrag(const nstring& dn)
{
if (dirfragtree.empty())
return frag_t(); // avoid the string hash if we can.
int stickydir_ref;
public:
- frag_t pick_dirfrag(const string &dn);
+ frag_t pick_dirfrag(const nstring &dn);
bool has_dirfrags() { return !dirfrags.empty(); }
CDir* get_dirfrag(frag_t fg) {
if (dirfrags.count(fg)) {
}
// walk weak map
- for (map<dirfrag_t, map<string, MMDSCacheRejoin::dn_weak> >::iterator p = weak->weak.begin();
+ for (map<dirfrag_t, map<nstring, MMDSCacheRejoin::dn_weak> >::iterator p = weak->weak.begin();
p != weak->weak.end();
++p) {
CDir *dir = get_dirfrag(p->first);
ack->add_strong_dirfrag(p->first, nonce, dir->dir_rep);
// weak dentries
- for (map<string,MMDSCacheRejoin::dn_weak>::iterator q = p->second.begin();
+ for (map<nstring,MMDSCacheRejoin::dn_weak>::iterator q = p->second.begin();
q != p->second.end();
++q) {
CDentry *dn = dir->lookup(q->first);
dir->add_replica(from);
dir->dir_rep = p->second.dir_rep;
- for (map<string,MMDSCacheRejoin::dn_strong>::iterator q = strong->strong_dentries[p->first].begin();
+ for (map<nstring,MMDSCacheRejoin::dn_strong>::iterator q = strong->strong_dentries[p->first].begin();
q != strong->strong_dentries[p->first].end();
++q) {
CDentry *dn = dir->lookup(q->first);
dout(10) << " got " << *dir << dendl;
// dentries
- for (map<string,MMDSCacheRejoin::dn_strong>::iterator q = ack->strong_dentries[p->first].begin();
+ for (map<nstring,MMDSCacheRejoin::dn_strong>::iterator q = ack->strong_dentries[p->first].begin();
q != ack->strong_dentries[p->first].end();
++q) {
CDentry *dn = dir->lookup(q->first);
}
// DENTRIES
- for (map<dirfrag_t, map<string,int> >::iterator pd = p->second.dentries.begin();
+ for (map<dirfrag_t, map<nstring,int> >::iterator pd = p->second.dentries.begin();
pd != p->second.dentries.end();
++pd) {
dout(10) << " dn expires in dir " << pd->first << dendl;
assert(dir->is_auth());
}
- for (map<string,int>::iterator p = pd->second.begin();
+ for (map<nstring,int>::iterator p = pd->second.begin();
p != pd->second.end();
++p) {
int nonce = p->second;
#define __MDS_EMETABLOB_H
#include <stdlib.h>
-#include <string>
-using std::string;
+
+#include "include/nstring.h"
#include "../CInode.h"
#include "../CDir.h"
/* fullbit - a regular dentry + inode
*/
struct fullbit {
- string dn; // dentry
+ nstring dn; // dentry
version_t dnv;
inode_t inode; // if it's not
fragtree_t dirfragtree;
string symlink;
bool dirty;
- fullbit(const string& d, version_t v, inode_t& i, fragtree_t &dft, map<string,bufferptr> &xa, string& sym, bool dr) :
+ fullbit(const nstring& d, version_t v, inode_t& i, fragtree_t &dft, map<string,bufferptr> &xa, const string& sym, bool dr) :
dn(d), dnv(v), inode(i), dirfragtree(dft), xattrs(xa), symlink(sym), dirty(dr) { }
fullbit(bufferlist::iterator &p) { decode(p); }
fullbit() {}
/* remotebit - a dentry + remote inode link (i.e. just an ino)
*/
struct remotebit {
- string dn;
+ nstring dn;
version_t dnv;
inodeno_t ino;
unsigned char d_type;
bool dirty;
- remotebit(const string& d, version_t v, inodeno_t i, unsigned char dt, bool dr) :
+ remotebit(const nstring& d, version_t v, inodeno_t i, unsigned char dt, bool dr) :
dn(d), dnv(v), ino(i), d_type(dt), dirty(dr) { }
remotebit(bufferlist::iterator &p) { decode(p); }
remotebit() {}
* nullbit - a null dentry
*/
struct nullbit {
- string dn;
+ nstring dn;
version_t dnv;
bool dirty;
- nullbit(const string& d, version_t v, bool dr) : dn(d), dnv(v), dirty(dr) { }
+ nullbit(const nstring& d, version_t v, bool dr) : dn(d), dnv(v), dirty(dr) { }
nullbit(bufferlist::iterator &p) { decode(p); }
nullbit() {}
utime_t dirfrag_old_mtime;
utime_t dirfrag_old_rctime;
inodeno_t ino, remote_ino;
- string dname;
+ nstring dname;
char remote_d_type;
utime_t old_ctime;
#include "include/frag.h"
#include "include/xlist.h"
+#include "include/nstring.h"
#define MDS_REF_SET // define me for improved debug output, sanity checking
//#define MDS_VERIFY_FRAGSTAT // do do (slow) sanity checking on frags
public:
inodeno_t ino;
dirfrag_t dirfrag;
- string dname;
+ nstring dname;
MDSCacheObjectInfo() : ino(0) {}
struct realm {
map<inodeno_t, __s32> inodes;
map<dirfrag_t, __s32> dirs;
- map<dirfrag_t, map<string,__s32> > dentries;
+ map<dirfrag_t, map<nstring,__s32> > dentries;
void encode(bufferlist &bl) const {
::encode(inodes, bl);
void add_dir(dirfrag_t r, dirfrag_t df, int nonce) {
realms[r].dirs[df] = nonce;
}
- void add_dentry(dirfrag_t r, dirfrag_t df, const string& dn, int nonce) {
+ void add_dentry(dirfrag_t r, dirfrag_t df, const nstring& dn, int nonce) {
realms[r].dentries[df][dn] = nonce;
}
p != r.dirs.end();
++p)
myr.dirs[p->first] = p->second;
- for (map<dirfrag_t, map<string,int> >::iterator p = r.dentries.begin();
+ for (map<dirfrag_t, map<nstring,int> >::iterator p = r.dentries.begin();
p != r.dentries.end();
++p)
- for (map<string,int>::iterator q = p->second.begin();
+ for (map<nstring,int>::iterator q = p->second.begin();
q != p->second.end();
++q)
myr.dentries[p->first][q->first] = q->second;
struct MClientLease : public Message {
struct ceph_mds_lease h;
- string dname;
+ nstring dname;
int get_action() { return h.action; }
int get_mask() { return h.mask; }
h.mask = m;
h.ino = i;
}
- MClientLease(int ac, int m, __u64 i, const string& d) :
+ MClientLease(int ac, int m, __u64 i, const nstring& d) :
Message(CEPH_MSG_CLIENT_LEASE),
dname(d) {
h.action = ac;
class MDentryUnlink : public Message {
dirfrag_t dirfrag;
- string dn;
+ nstring dn;
public:
dirfrag_t get_dirfrag() { return dirfrag; }
- string& get_dn() { return dn; }
+ nstring& get_dn() { return dn; }
CInodeDiscover *strayin;
CDirDiscover *straydir;
MDentryUnlink() :
Message(MSG_MDS_DENTRYUNLINK),
strayin(0), straydir(0), straydn(0) { }
- MDentryUnlink(dirfrag_t df, string& n) :
+ MDentryUnlink(dirfrag_t df, nstring& n) :
Message(MSG_MDS_DENTRYUNLINK),
dirfrag(df),
dn(n),
list<CInodeDiscover*> inodes;
list<CDentryDiscover*> dentries;
map<inodeno_t,dirfrag_t> inode_dirfrag;
- map<inodeno_t,string> inode_dentry;
+ map<inodeno_t,nstring> inode_dentry;
map<inodeno_t,list<frag_t> > frags_by_ino;
map<dirfrag_t,CDirDiscover*> dirfrags;
dirfrag_t get_containing_dirfrag(inodeno_t ino) {
return inode_dirfrag[ino];
}
- string& get_dentry(inodeno_t ino) {
+ nstring& get_dentry(inodeno_t ino) {
return inode_dentry[ino];
}
bool have_dirfrag(dirfrag_t df) {
void add_export(dirfrag_t df) {
bounds.push_back( df );
}
- void add_inode(dirfrag_t df, const string& name, CDentryDiscover *dn, CInodeDiscover *in) {
+ void add_inode(dirfrag_t df, const nstring& name, CDentryDiscover *dn, CInodeDiscover *in) {
inodes.push_back(in);
dentries.push_back(dn);
inode_dirfrag[in->get_ino()] = df;
// weak
map<dirfrag_t, pair<frag_info_t, frag_info_t> > dirfrag_stat;
- map<dirfrag_t, map<string, dn_weak> > weak;
+ map<dirfrag_t, map<nstring, dn_weak> > weak;
set<inodeno_t> weak_inodes;
// strong
map<dirfrag_t, dirfrag_strong> strong_dirfrags;
- map<dirfrag_t, map<string, dn_strong> > strong_dentries;
+ map<dirfrag_t, map<nstring, dn_strong> > strong_dentries;
map<inodeno_t, inode_strong> strong_inodes;
// open
// authpins, xlocks
map<inodeno_t, metareqid_t> authpinned_inodes;
map<inodeno_t, map<__s32, metareqid_t> > xlocked_inodes;
- map<dirfrag_t, map<string, metareqid_t> > authpinned_dentries;
- map<dirfrag_t, map<string, metareqid_t> > xlocked_dentries;
+ map<dirfrag_t, map<nstring, metareqid_t> > authpinned_dentries;
+ map<dirfrag_t, map<nstring, metareqid_t> > xlocked_dentries;
MMDSCacheRejoin() : Message(MSG_MDS_CACHEREJOIN) {}
MMDSCacheRejoin(int o) :
void add_weak_dirfrag(dirfrag_t df) {
weak[df];
}
- void add_weak_dirfrag(dirfrag_t df, map<string,dn_weak>& dnmap) {
+ void add_weak_dirfrag(dirfrag_t df, map<nstring,dn_weak>& dnmap) {
weak[df] = dnmap;
}
void add_strong_dirfrag(dirfrag_t df, int n, int dr) {
void add_weak_primary_dentry(dirfrag_t df, const string& dname, inodeno_t ino) {
weak[df][dname] = dn_weak(ino);
}
- void add_strong_dentry(dirfrag_t df, const string& dname, inodeno_t pi, inodeno_t ri, unsigned char rdt, int n, int ls) {
+ void add_strong_dentry(dirfrag_t df, const nstring& dname, inodeno_t pi, inodeno_t ri, unsigned char rdt, int n, int ls) {
strong_dentries[df][dname] = dn_strong(pi, ri, rdt, n, ls);
}
- void add_dentry_authpin(dirfrag_t df, const string& dname, const metareqid_t& ri) {
+ void add_dentry_authpin(dirfrag_t df, const nstring& dname, const metareqid_t& ri) {
authpinned_dentries[df][dname] = ri;
}
- void add_dentry_xlock(dirfrag_t df, const string& dname, const metareqid_t& ri) {
+ void add_dentry_xlock(dirfrag_t df, const nstring& dname, const metareqid_t& ri) {
xlocked_dentries[df][dname] = ri;
}