diff options
author | Sage Weil <sage@newdream.net> | 2011-07-26 11:28:25 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-07-26 11:28:25 -0700 |
commit | 2f90b852e3ae73889d7f6de6ecf429b9b6a6b103 (patch) | |
tree | 584e53ef3a6919e68ee0d8804da8f3d63838a3fc /fs/ceph/inode.c | |
parent | 468640e32c7f6bfdaaa011095cc388786755d159 (diff) | |
download | blackbird-op-linux-2f90b852e3ae73889d7f6de6ecf429b9b6a6b103.tar.gz blackbird-op-linux-2f90b852e3ae73889d7f6de6ecf429b9b6a6b103.zip |
ceph: ignore lease mask
The lease mask is no longer used (and it changed a while back). Instead,
use a non-zero duration to indicate that there is a lease being issued.
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index d8858e96ab18..f51e873e966f 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -805,14 +805,14 @@ static void update_dentry_lease(struct dentry *dentry, return; spin_lock(&dentry->d_lock); - dout("update_dentry_lease %p mask %d duration %lu ms ttl %lu\n", - dentry, le16_to_cpu(lease->mask), duration, ttl); + dout("update_dentry_lease %p duration %lu ms ttl %lu\n", + dentry, duration, ttl); /* make lease_rdcache_gen match directory */ dir = dentry->d_parent->d_inode; di->lease_shared_gen = ceph_inode(dir)->i_shared_gen; - if (lease->mask == 0) + if (duration == 0) goto out_unlock; if (di->lease_gen == session->s_cap_gen && @@ -1022,9 +1022,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, /* do we have a dn lease? */ have_lease = have_dir_cap || - (le16_to_cpu(rinfo->dlease->mask) & - CEPH_LOCK_DN); - + le32_to_cpu(rinfo->dlease->duration_ms); if (!have_lease) dout("fill_trace no dentry lease or dir cap\n"); |