From 5dc09dd6b81c622960f628acdabda9eac8af1ceb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 7 Jul 2011 13:35:32 -0700 Subject: [PATCH] mds: set old and new dentry lease bits Recent kernels got the new CEPH_LOCK_DN definition but we were still setting the old bit. Set both so we work with both classes of clients. In the meantime, update the kernel to ignore this field so that eventually we can drop/reuse it. Signed-off-by: Sage Weil --- src/mds/Locker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index d7cfb95ed8581..d7f0868c3e8a4 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2774,7 +2774,7 @@ void Locker::issue_client_lease(CDentry *dn, client_t client, mdcache->touch_client_lease(l, pool, now); LeaseStat e; - e.mask = 1; + e.mask = 1 | CEPH_LOCK_DN; // old and new bit values e.seq = ++l->seq; e.duration_ms = (int)(1000 * mdcache->client_lease_durations[pool]); ::encode(e, bl); @@ -2805,7 +2805,7 @@ void Locker::revoke_client_leases(SimpleLock *lock) assert(lock->get_type() == CEPH_LOCK_DN); CDentry *dn = (CDentry*)lock->get_parent(); - int mask = 1; + int mask = 1 | CEPH_LOCK_DN; // old and new bits // i should also revoke the dir ICONTENT lease, if they have it! CInode *diri = dn->get_dir()->get_inode();