]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: no assertion on inode being purging in find_ino_peers() 18869/head
authorZhi Zhang <willzzhang@tencent.com>
Mon, 9 Oct 2017 06:33:05 +0000 (14:33 +0800)
committerShinobu Kinjo <shinobu@redhat.com>
Fri, 10 Nov 2017 07:14:46 +0000 (02:14 -0500)
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit e55b2dbfcacb3b5afddba2d2b24c0386a0a48ebb)

src/mds/MDCache.cc

index b40833fd1cabbee3ebf15906d4df332f8239e677..3bdd067c88b39b022759d37837fe56dce17b453e 100644 (file)
@@ -8839,7 +8839,12 @@ void MDCache::open_ino(inodeno_t ino, int64_t pool, MDSInternalContextBase* fin,
 void MDCache::find_ino_peers(inodeno_t ino, MDSInternalContextBase *c, mds_rank_t hint)
 {
   dout(5) << "find_ino_peers " << ino << " hint " << hint << dendl;
-  assert(!have_inode(ino));
+  CInode *in = get_inode(ino);
+  if (in && in->state_test(CInode::STATE_PURGING)) {
+    c->complete(-ESTALE);
+    return;
+  }
+  assert(!in);
   
   ceph_tid_t tid = ++find_ino_peer_last_tid;
   find_ino_peer_info_t& fip = find_ino_peer[tid];