Commit 2f56f56a authored by Sage Weil's avatar Sage Weil
Browse files

Revert "ceph: update issue_seq on cap grant"



This reverts commit d91f2438.

The intent of issue_seq is to distinguish between mds->client messages that
(re)create the cap and those that do not, which means we should _only_ be
updating that value in the create paths.  By updating it in handle_cap_grant,
we reset it to zero, which then breaks release.

The larger question is what workload/problem made me think it should be
updated here...

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent efa4c120
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2273,8 +2273,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
{
	struct ceph_inode_info *ci = ceph_inode(inode);
	int mds = session->s_mds;
	unsigned seq = le32_to_cpu(grant->seq);
	unsigned issue_seq = le32_to_cpu(grant->issue_seq);
	int seq = le32_to_cpu(grant->seq);
	int newcaps = le32_to_cpu(grant->caps);
	int issued, implemented, used, wanted, dirty;
	u64 size = le64_to_cpu(grant->size);
@@ -2286,8 +2285,8 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
	int revoked_rdcache = 0;
	int queue_invalidate = 0;

	dout("handle_cap_grant inode %p cap %p mds%d seq %u/%u %s\n",
	     inode, cap, mds, seq, issue_seq, ceph_cap_string(newcaps));
	dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
	     inode, cap, mds, seq, ceph_cap_string(newcaps));
	dout(" size %llu max_size %llu, i_size %llu\n", size, max_size,
		inode->i_size);

@@ -2383,7 +2382,6 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
	}

	cap->seq = seq;
	cap->issue_seq = issue_seq;

	/* file layout may have changed */
	ci->i_layout = grant->layout;