aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-07-01 04:54:34 -0400
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-07-08 07:08:46 -0400
commitc5c9a0bf1b03112d606edaab15f18e892e8b55af (patch)
treecadce19519a68bddbb2dc2e3c507cfdd55beb509 /fs/ceph
parentfbba11b3bec52ff560cb42d102f61341049defb0 (diff)
ceph: include time stamp in replayed MDS requests
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 92a2548278fc..0225523297c3 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1904,6 +1904,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,
1904 req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts); 1904 req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts);
1905 1905
1906 if (req->r_got_unsafe) { 1906 if (req->r_got_unsafe) {
1907 void *p;
1907 /* 1908 /*
1908 * Replay. Do not regenerate message (and rebuild 1909 * Replay. Do not regenerate message (and rebuild
1909 * paths, etc.); just use the original message. 1910 * paths, etc.); just use the original message.
@@ -1924,8 +1925,13 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,
1924 1925
1925 /* remove cap/dentry releases from message */ 1926 /* remove cap/dentry releases from message */
1926 rhead->num_releases = 0; 1927 rhead->num_releases = 0;
1927 msg->hdr.front_len = cpu_to_le32(req->r_request_release_offset); 1928
1928 msg->front.iov_len = req->r_request_release_offset; 1929 /* time stamp */
1930 p = msg->front.iov_base + req->r_request_release_offset;
1931 ceph_encode_copy(&p, &req->r_stamp, sizeof(req->r_stamp));
1932
1933 msg->front.iov_len = p - msg->front.iov_base;
1934 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
1929 return 0; 1935 return 0;
1930 } 1936 }
1931 1937