]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDS: Make _rename_apply inode import auth_pinning more intelligent.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 7 Apr 2011 00:05:26 +0000 (17:05 -0700)
committerSage Weil <sage@newdream.net>
Mon, 18 Apr 2011 17:40:21 +0000 (10:40 -0700)
We don't want auth_pins on the locallocks (they're never auth_pinned)
and we only want new auth_pins that are for locks on the inode that we
imported -- not for each xlock that the mdr has everywhere (like,
say, on the srcdn)!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/Server.cc

index cc9e17341b0f156e8b55c787066979cbdab2e77e..4b253226c08c1227e51448b3935d541c43bec9f6 100644 (file)
@@ -5353,7 +5353,9 @@ void Server::_rename_apply(MDRequest *mdr, CDentry *srcdn, CDentry *destdn, CDen
        for (set<SimpleLock *>::iterator i = mdr->xlocks.begin();
            i !=  mdr->xlocks.end();
            ++i)
-         destdnl->get_inode()->auth_pin(*i);
+         if (!(*i)->is_locallock() &&
+             (*i)->get_parent() == destdnl->get_inode())
+           destdnl->get_inode()->auth_pin(*i);
       }
       
       // hack: fix auth bit