Skip to content

Commit

Permalink
mds: set old and new dentry lease bits
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
liewegas committed Jul 7, 2011
1 parent 616ff50 commit 5dc09dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mds/Locker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 5dc09dd

Please sign in to comment.