summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-07-01 16:54:34 +0800
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-07-08 15:08:46 +0400
commitc5c9a0bf1b03112d606edaab15f18e892e8b55af (patch)
treecadce19519a68bddbb2dc2e3c507cfdd55beb509 /fs/ceph
parentfbba11b3bec52ff560cb42d102f61341049defb0 (diff)
downloadop-kernel-dev-c5c9a0bf1b03112d606edaab15f18e892e8b55af.zip
op-kernel-dev-c5c9a0bf1b03112d606edaab15f18e892e8b55af.tar.gz
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 92a2548..0225523 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,
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;
}
OpenPOWER on IntegriCloud