ceph: do not include cap/dentry releases in replayed messages

Strip the cap and dentry releases from replayed messages. They can
cause the shared state to get out of sync because they were generated
(with the request message) earlier, and no longer reflect the current
client state.

Signed-off-by: Sage Weil <sage@newdream.net>

Sage Weil e979cf50 01a92f17

+9
+8
fs/ceph/mds_client.c
··· 1514 1514 ceph_encode_filepath(&p, end, ino1, path1); 1515 1515 ceph_encode_filepath(&p, end, ino2, path2); 1516 1516 1517 + /* make note of release offset, in case we need to replay */ 1518 + req->r_request_release_offset = p - msg->front.iov_base; 1519 + 1517 1520 /* cap releases */ 1518 1521 releases = 0; 1519 1522 if (req->r_inode_drop) ··· 1601 1598 rhead->ino = cpu_to_le64(ceph_ino(req->r_target_inode)); 1602 1599 1603 1600 rhead->num_retry = req->r_attempts - 1; 1601 + 1602 + /* remove cap/dentry releases from message */ 1603 + rhead->num_releases = 0; 1604 + msg->hdr.front_len = cpu_to_le32(req->r_request_release_offset); 1605 + msg->front.iov_len = req->r_request_release_offset; 1604 1606 return 0; 1605 1607 } 1606 1608
+1
fs/ceph/mds_client.h
··· 188 188 int r_old_inode_drop, r_old_inode_unless; 189 189 190 190 struct ceph_msg *r_request; /* original request */ 191 + int r_request_release_offset; 191 192 struct ceph_msg *r_reply; 192 193 struct ceph_mds_reply_info_parsed r_reply_info; 193 194 int r_err;