]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix up loner_cap whenever we manually change filelock state
authorSage Weil <sage@newdream.net>
Thu, 27 Nov 2008 00:32:29 +0000 (16:32 -0800)
committerSage Weil <sage@newdream.net>
Thu, 27 Nov 2008 00:32:29 +0000 (16:32 -0800)
This is kind of a pain.

src/mds/MDCache.cc

index 46050e48dc724692751d1c1600e8cc9907420392..ff81f23297047a1d85e31b3d6d23822ebef7c61a 100644 (file)
@@ -3136,6 +3136,8 @@ void MDCache::handle_cache_rejoin_strong(MMDSCacheRejoin *strong)
              MDRequest *mdr = request_get(r->second);  // should have this from auth_pin above.
              assert(mdr->is_auth_pinned(in));
              lock->set_state(LOCK_LOCK);
+             if (lock == &in->filelock)
+               in->loner_cap = -1;
              lock->get_xlock(mdr);
              mdr->xlocks.insert(lock);
              mdr->locks.insert(lock);
@@ -3992,6 +3994,7 @@ void MDCache::identify_files_to_recover()
       continue;
     if (in->inode.max_size > in->inode.size) {
       in->filelock.set_state(LOCK_LOCK);
+      in->loner_cap = -1;
       q.push_back(in);
     }
   }