[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460484484-22395-13-git-send-email-luis.henriques@canonical.com>
Date: Tue, 12 Apr 2016 19:07:59 +0100
From: Luis Henriques <luis.henriques@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: "Yan, Zheng" <zyan@...hat.com>,
Kamal Mostafa <kamal@...onical.com>,
Luis Henriques <luis.henriques@...onical.com>
Subject: [PATCH 3.16.y-ckt 12/17] ceph: fix request time stamp encoding
3.16.7-ckt27 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: "Yan, Zheng" <zyan@...hat.com>
commit 1f041a89b4f22cf2e701514f4b8f73a8b1e06a3e upstream.
struct timespec uses 'long' to present second and nanosecond. 'long'
is 64 bits on 64bits machine. ceph MDS expects time stamp to be
encoded as struct ceph_timespec, which uses 'u32' to present second
and nanosecond.
Signed-off-by: Yan, Zheng <zyan@...hat.com>
BugLink: http://tracker.ceph.com/issues/15302
BugLink: http://bugs.launchpad.net/bugs/1564950
[ kamal: backport to 3.16-stable: no time stamp in __prepare_send_request() ]
Signed-off-by: Kamal Mostafa <kamal@...onical.com>
Signed-off-by: Luis Henriques <luis.henriques@...onical.com>
---
fs/ceph/mds_client.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 63f2bc82f4af..6b6f11b8f36a 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1841,7 +1841,11 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
head->num_releases = cpu_to_le16(releases);
/* time stamp */
- ceph_encode_copy(&p, &req->r_stamp, sizeof(req->r_stamp));
+ {
+ struct ceph_timespec ts;
+ ceph_encode_timespec(&ts, &req->r_stamp);
+ ceph_encode_copy(&p, &ts, sizeof(ts));
+ }
BUG_ON(p > end);
msg->front.iov_len = p - msg->front.iov_base;
Powered by blists - more mailing lists