aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-09 16:41:47 -0500
committerSage Weil <sage@newdream.net>2010-02-11 14:48:52 -0500
commit68c283236a1e0772e1a469dd2ffc17afc300b07b (patch)
tree6bdca5168713dab721f5458487e3c9d218d24726 /fs/ceph
parentcbd03635913a86afb7c2cfc0058932956b05b51e (diff)
ceph: do not retain caps that are being revoked
Never retain caps in __send_cap() that are being revoked. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 822f7d3632fe..7f4841cd3a2b 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1042,10 +1042,7 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
1042 struct ceph_inode_info *ci = cap->ci; 1042 struct ceph_inode_info *ci = cap->ci;
1043 struct inode *inode = &ci->vfs_inode; 1043 struct inode *inode = &ci->vfs_inode;
1044 u64 cap_id = cap->cap_id; 1044 u64 cap_id = cap->cap_id;
1045 int held = cap->issued | cap->implemented; 1045 int held, revoking, dropping, keep;
1046 int revoking = cap->implemented & ~cap->issued;
1047 int dropping = cap->issued & ~retain;
1048 int keep;
1049 u64 seq, issue_seq, mseq, time_warp_seq, follows; 1046 u64 seq, issue_seq, mseq, time_warp_seq, follows;
1050 u64 size, max_size; 1047 u64 size, max_size;
1051 struct timespec mtime, atime; 1048 struct timespec mtime, atime;
@@ -1060,6 +1057,11 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
1060 int i; 1057 int i;
1061 int ret; 1058 int ret;
1062 1059
1060 held = cap->issued | cap->implemented;
1061 revoking = cap->implemented & ~cap->issued;
1062 retain &= ~revoking;
1063 dropping = cap->issued & ~retain;
1064
1063 dout("__send_cap %p cap %p session %p %s -> %s (revoking %s)\n", 1065 dout("__send_cap %p cap %p session %p %s -> %s (revoking %s)\n",
1064 inode, cap, cap->session, 1066 inode, cap, cap->session,
1065 ceph_cap_string(held), ceph_cap_string(held & retain), 1067 ceph_cap_string(held), ceph_cap_string(held & retain),