summaryrefslogtreecommitdiffstats
path: root/src/mds/Migrator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds/Migrator.cc')
-rw-r--r--src/mds/Migrator.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
index 2061079ce9d..88503449125 100644
--- a/src/mds/Migrator.cc
+++ b/src/mds/Migrator.cc
@@ -829,7 +829,7 @@ void Migrator::export_go_synced(CDir *dir)
// fill export message with cache data
MExportDir *req = new MExportDir(dir->dirfrag());
utime_t now = g_clock.now();
- map<__u32,entity_inst_t> exported_client_map;
+ map<client_t,entity_inst_t> exported_client_map;
int num_exported_inodes = encode_export_dir(req->export_data,
dir, // recur start point
exported_client_map,
@@ -864,7 +864,7 @@ void Migrator::export_go_synced(CDir *dir)
* is pretty arbitrary and dumb.
*/
void Migrator::encode_export_inode(CInode *in, bufferlist& enc_state,
- map<__u32,entity_inst_t>& exported_client_map)
+ map<client_t,entity_inst_t>& exported_client_map)
{
dout(7) << "encode_export_inode " << *in << dendl;
assert(!in->is_replica(mds->get_nodeid()));
@@ -878,20 +878,20 @@ void Migrator::encode_export_inode(CInode *in, bufferlist& enc_state,
}
void Migrator::encode_export_inode_caps(CInode *in, bufferlist& bl,
- map<__u32,entity_inst_t>& exported_client_map)
+ map<client_t,entity_inst_t>& exported_client_map)
{
// encode caps
- map<int,Capability::Export> cap_map;
+ map<client_t,Capability::Export> cap_map;
in->export_client_caps(cap_map);
::encode(cap_map, bl);
in->state_set(CInode::STATE_EXPORTINGCAPS);
// make note of clients named by exported capabilities
- for (map<int, Capability*>::iterator it = in->client_caps.begin();
+ for (map<client_t, Capability*>::iterator it = in->client_caps.begin();
it != in->client_caps.end();
it++)
- exported_client_map[it->first] = mds->sessionmap.get_inst(entity_name_t::CLIENT(it->first));
+ exported_client_map[it->first] = mds->sessionmap.get_inst(entity_name_t::CLIENT(it->first.v));
}
void Migrator::finish_export_inode_caps(CInode *in)
@@ -899,7 +899,7 @@ void Migrator::finish_export_inode_caps(CInode *in)
in->state_clear(CInode::STATE_EXPORTINGCAPS);
// tell (all) clients about migrating caps..
- for (map<int, Capability*>::iterator it = in->client_caps.begin();
+ for (map<client_t, Capability*>::iterator it = in->client_caps.begin();
it != in->client_caps.end();
it++) {
Capability *cap = it->second;
@@ -961,7 +961,7 @@ void Migrator::finish_export_inode(CInode *in, utime_t now, list<Context*>& fini
int Migrator::encode_export_dir(bufferlist& exportbl,
CDir *dir,
- map<__u32,entity_inst_t>& exported_client_map,
+ map<client_t,entity_inst_t>& exported_client_map,
utime_t now)
{
int num_exported = 0;
@@ -1629,7 +1629,7 @@ class C_MDS_ImportDirLoggedStart : public Context {
CDir *dir;
int from;
public:
- map<__u32,entity_inst_t> imported_client_map;
+ map<client_t,entity_inst_t> imported_client_map;
C_MDS_ImportDirLoggedStart(Migrator *m, CDir *d, int f) :
migrator(m), dir(d), from(f) {
@@ -1807,7 +1807,7 @@ void Migrator::import_reverse(CDir *dir)
}
// reexport caps
- for (map<CInode*, map<__u32,Capability::Export> >::iterator p = import_caps[dir].begin();
+ for (map<CInode*, map<client_t,Capability::Export> >::iterator p = import_caps[dir].begin();
p != import_caps[dir].end();
++p) {
CInode *in = p->first;
@@ -1815,7 +1815,7 @@ void Migrator::import_reverse(CDir *dir)
* bleh.. just export all caps for this inode. the auth mds
* will pick them up during recovery.
*/
- map<int,Capability::Export> cap_map; // throw this away
+ map<client_t,Capability::Export> cap_map; // throw this away
in->export_client_caps(cap_map);
finish_export_inode_caps(in);
}
@@ -1885,7 +1885,7 @@ void Migrator::import_reverse_final(CDir *dir)
void Migrator::import_logged_start(CDir *dir, int from,
- map<__u32,entity_inst_t>& imported_client_map)
+ map<client_t,entity_inst_t>& imported_client_map)
{
dout(7) << "import_logged " << *dir << dendl;
@@ -1895,7 +1895,7 @@ void Migrator::import_logged_start(CDir *dir, int from,
// force open client sessions and finish cap import
mds->server->finish_force_open_sessions(imported_client_map);
- for (map<CInode*, map<__u32,Capability::Export> >::iterator p = import_caps[dir].begin();
+ for (map<CInode*, map<client_t,Capability::Export> >::iterator p = import_caps[dir].begin();
p != import_caps[dir].end();
++p) {
finish_import_inode_caps(p->first, from, p->second);
@@ -1977,7 +1977,7 @@ void Migrator::import_finish(CDir *dir)
void Migrator::decode_import_inode(CDentry *dn, bufferlist::iterator& blp, int oldauth,
LogSegment *ls,
- map<CInode*, map<__u32,Capability::Export> >& cap_imports,
+ map<CInode*, map<client_t,Capability::Export> >& cap_imports,
list<ScatterLock*>& updated_scatterlocks)
{
dout(15) << "decode_import_inode on " << *dn << dendl;
@@ -2033,9 +2033,9 @@ void Migrator::decode_import_inode(CDentry *dn, bufferlist::iterator& blp, int o
void Migrator::decode_import_inode_caps(CInode *in,
bufferlist::iterator &blp,
- map<CInode*, map<__u32,Capability::Export> >& cap_imports)
+ map<CInode*, map<client_t,Capability::Export> >& cap_imports)
{
- map<__u32,Capability::Export> cap_map;
+ map<client_t,Capability::Export> cap_map;
::decode(cap_map, blp);
if (!cap_map.empty()) {
cap_imports[in].swap(cap_map);
@@ -2044,15 +2044,15 @@ void Migrator::decode_import_inode_caps(CInode *in,
}
void Migrator::finish_import_inode_caps(CInode *in, int from,
- map<__u32,Capability::Export> &cap_map)
+ map<client_t,Capability::Export> &cap_map)
{
assert(!cap_map.empty());
- for (map<__u32,Capability::Export>::iterator it = cap_map.begin();
+ for (map<client_t,Capability::Export>::iterator it = cap_map.begin();
it != cap_map.end();
it++) {
dout(0) << "finish_import_inode_caps for client" << it->first << " on " << *in << dendl;
- Session *session = mds->sessionmap.get_session(entity_name_t::CLIENT(it->first));
+ Session *session = mds->sessionmap.get_session(entity_name_t::CLIENT(it->first.v));
assert(session);
Capability *cap = in->get_client_cap(it->first);
@@ -2072,7 +2072,7 @@ int Migrator::decode_import_dir(bufferlist::iterator& blp,
CDir *import_root,
EImportStart *le,
LogSegment *ls,
- map<CInode*, map<__u32,Capability::Export> >& cap_imports,
+ map<CInode*, map<client_t,Capability::Export> >& cap_imports,
list<ScatterLock*>& updated_scatterlocks)
{
// set up dir
@@ -2277,7 +2277,7 @@ class C_M_LoggedImportCaps : public Context {
CInode *in;
int from;
public:
- map<CInode*, map<__u32,Capability::Export> > cap_imports;
+ map<CInode*, map<client_t,Capability::Export> > cap_imports;
C_M_LoggedImportCaps(Migrator *m, CInode *i, int f) : migrator(m), in(i), from(f) {}
void finish(int r) {
@@ -2318,7 +2318,7 @@ void Migrator::handle_export_caps(MExportCaps *ex)
void Migrator::logged_import_caps(CInode *in,
int from,
- map<CInode*, map<__u32,Capability::Export> >& cap_imports)
+ map<CInode*, map<client_t,Capability::Export> >& cap_imports)
{
dout(10) << "logged_import_caps on " << *in << dendl;
assert(cap_imports.count(in));