Commit c5c9a0bf authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: include time stamp in replayed MDS requests

parent fbba11b3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1904,6 +1904,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,
	     req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts);

	if (req->r_got_unsafe) {
		void *p;
		/*
		 * Replay.  Do not regenerate message (and rebuild
		 * paths, etc.); just use the original message.
@@ -1924,8 +1925,13 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,

		/* remove cap/dentry releases from message */
		rhead->num_releases = 0;
		msg->hdr.front_len = cpu_to_le32(req->r_request_release_offset);
		msg->front.iov_len = req->r_request_release_offset;

		/* time stamp */
		p = msg->front.iov_base + req->r_request_release_offset;
		ceph_encode_copy(&p, &req->r_stamp, sizeof(req->r_stamp));

		msg->front.iov_len = p - msg->front.iov_base;
		msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
		return 0;
	}