]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge remote-tracking branch 'dalgaaf/wip-da-performance'
authorSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 23:46:47 +0000 (16:46 -0700)
committerSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 23:46:47 +0000 (16:46 -0700)
Conflicts:
src/client/Client.cc

Reviewed-by: Sage Weil <sage@inktank.com>
1  2 
src/client/Client.cc
src/mds/MDSMap.h

index 970fd9c8b181173001ee35f05da3d40e5445dd4a,437d473429d59314ae884535aff9fc2991f6a0a3..5d7fc5faa8bd7a7d83ea0928983ae08b4793c371
@@@ -1109,12 -1109,13 +1109,12 @@@ void Client::connect_mds_targets(int md
    const MDSMap::mds_info_t& info = mdsmap->get_mds_info(mds);
    for (set<int>::const_iterator q = info.export_targets.begin();
         q != info.export_targets.end();
-        q++) {
+        ++q) {
 -    if (mds_sessions.count(*q) == 0 && waiting_for_session.count(*q) == 0) {
 +    if (mds_sessions.count(*q) == 0 &&
 +      mdsmap->is_clientreplay_or_active_or_stopping(*q)) {
        ldout(cct, 10) << "check_mds_sessions opening mds." << mds
 -             << " export target mds." << *q << dendl;
 -      messenger->send_message(new MClientSession(CEPH_SESSION_REQUEST_OPEN),
 -                            mdsmap->get_inst(*q));
 -      waiting_for_session[*q].size();
 +                   << " export target mds." << *q << dendl;
 +      _open_mds_session(*q);
      }
    }
  }
@@@ -2366,11 -2364,8 +2366,11 @@@ void Client::check_caps(Inode *in, boo
    while (it != in->caps.end()) {
      int mds = it->first;
      Cap *cap = it->second;
-     it++;
+     ++it;
  
 +    MetaSession *session = mds_sessions[mds];
 +    assert(session);
 +
      int revoking = cap->implemented & ~cap->issued;
      
      ldout(cct, 10) << " cap mds." << mds
@@@ -2507,10 -2502,11 +2507,10 @@@ void Client::flush_snaps(Inode *in, boo
  
    // pick auth mds
    assert(in->auth_cap);
 -  int mds = in->auth_cap->session->inst.name.num();
 +  MetaSession *session = in->auth_cap->session;
    int mseq = in->auth_cap->mseq;
 -  assert(mds >= 0);
  
-   for (map<snapid_t,CapSnap*>::iterator p = in->cap_snaps.begin(); p != in->cap_snaps.end(); p++) {
+   for (map<snapid_t,CapSnap*>::iterator p = in->cap_snaps.begin(); p != in->cap_snaps.end(); ++p) {
      CapSnap *capsnap = p->second;
      if (again) {
        // only one capsnap
@@@ -3787,9 -3777,9 +3787,9 @@@ void Client::flush_cap_releases(
    // send any cap releases
    for (map<int,MetaSession*>::iterator p = mds_sessions.begin();
         p != mds_sessions.end();
-        p++) {
+        ++p) {
 -    if (p->second->release && mdsmap->is_up(p->first)) {
 -      messenger->send_message(p->second->release, mdsmap->get_inst(p->first));
 +    if (p->second->release && mdsmap->is_clientreplay_or_active_or_stopping(p->first)) {
 +      messenger->send_message(p->second->release, p->second->con);
        p->second->release = 0;
      }
    }
@@@ -3839,10 -3829,10 +3839,10 @@@ void Client::renew_caps(
    
    for (map<int,MetaSession*>::iterator p = mds_sessions.begin();
         p != mds_sessions.end();
-        p++) {
+        ++p) {
      ldout(cct, 15) << "renew_caps requesting from mds." << p->first << dendl;
      if (mdsmap->get_state(p->first) >= MDSMap::STATE_REJOIN)
 -      renew_caps(p->first);
 +      renew_caps(p->second);
    }
  }
  
Simple merge