]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not add null dentry to frozen dir
authorSage Weil <sage@newdream.net>
Tue, 16 Mar 2010 19:14:22 +0000 (12:14 -0700)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2010 19:14:22 +0000 (12:14 -0700)
Otherwise we get confused when we unfreeze:

mds/mdstypes.h:1193: FAILED assert(ref_set.count(by) > 0)
 1: (MDSCacheObject::bad_put(int)+0x3e) [0x79acfc]
 2: (MDSCacheObject::put(int)+0x5a) [0x79e332]
 3: (CDentry::finish_export()+0x52) [0x8874ba]
 4: (Migrator::finish_export_dir(CDir*, std::list<Context*, std::allocator<Context*> >&, utime_t)+0x1a4) [0x8751fc]
 5: (Migrator::finish_export_dir(CDir*, std::list<Context*, std::allocator<Context*> >&, utime_t)+0x243) [0x87529b]

src/mds/MDCache.cc

index 484f877579e393490ce996974b900632e0c5128f..224ff5a653ae559e10d618b42c3da139e4e99111 100644 (file)
@@ -5924,12 +5924,15 @@ int MDCache::path_traverse(MDRequest *mdr, Message *req,     // who
          if (dn) {
            dout(20) << " had null " << *dn << dendl;
            assert(dnl->is_null());
-         } else {
+         } else if (!curdir->is_frozen()) {
            // create a null dentry
            dn = curdir->add_null_dentry(path[depth]);
            dout(20) << " added null " << *dn << dendl;
+         } else {
+           dout(20) << " not adding null to frozen dir " << dendl;
          }
-         pdnvec->push_back(dn);
+         if (dn)
+           pdnvec->push_back(dn);
        }
         return -ENOENT;
       } else {