]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow full dir lease (FILE_RDCACHE) on root ino
authorSage Weil <sage@newdream.net>
Wed, 8 Apr 2009 18:28:40 +0000 (11:28 -0700)
committerSage Weil <sage@newdream.net>
Wed, 8 Apr 2009 18:28:40 +0000 (11:28 -0700)
Now that root changes are persistent, and client looks at
rdcache_gen and not i_version anyway, this will work.

src/mds/Locker.cc

index fa323f439c8ed1f221f7524955acace0ee0bc729..c40eb080cefdb8675f6f327c4f19f21b45dfb753 100644 (file)
@@ -1919,8 +1919,7 @@ int Locker::issue_client_lease(CDentry *dn, int client,
 
   CInode *diri = dn->get_dir()->get_inode();
   if (!diri->is_stray() &&  // do not issue dn leases in stray dir!
-      (diri->is_root() ||   // base inode's don't get version updated, so ICONTENT is useless.
-       (!diri->filelock.can_lease(client) &&
+      ((!diri->filelock.can_lease(client) &&
        (diri->get_client_cap_pending(client) & ((CEPH_CAP_GEXCL|CEPH_CAP_GRDCACHE) << CEPH_CAP_SFILE)) == 0)) &&
       dn->lock.can_lease(client))
     mask |= CEPH_LOCK_DN;