[RFC v2a 11/12] net: ceph: use vfs_time data type instead of timespec
From: Deepa Dinamani
Date: Fri Feb 12 2016 - 04:37:37 EST
The VFS inode timestamps are not y2038 safe as they use
struct timespec. These will be changed to use struct timespec64
instead and that is y2038 safe.
But, since the above data type conversion will break the end
file systems, use vfs_time aliases here to access inode times.
These timestamps are passed in as arguments to functions
using inode timestamps. Hence, these need to change along
with vfs to support 64 bit timestamps. vfs_time helps do
this transition.
Signed-off-by: Deepa Dinamani <deepa.kernel@xxxxxxxxx>
---
include/linux/ceph/messenger.h | 1 +
include/linux/ceph/osd_client.h | 4 ++--
net/ceph/osd_client.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index afe886b..28bba12 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -8,6 +8,7 @@
#include <linux/radix-tree.h>
#include <linux/uio.h>
#include <linux/workqueue.h>
+#include <linux/fs.h>
#include <net/net_namespace.h>
#include <linux/ceph/types.h>
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 7506b48..2b6f08b 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -322,7 +322,7 @@ extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *
extern void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off,
struct ceph_snap_context *snapc,
u64 snap_id,
- struct timespec *mtime);
+ struct vfs_time *mtime);
extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
struct ceph_file_layout *layout,
@@ -364,7 +364,7 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc,
struct ceph_snap_context *sc,
u64 off, u64 len,
u32 truncate_seq, u64 truncate_size,
- struct timespec *mtime,
+ struct vfs_time *mtime,
struct page **pages, int nr_pages);
/* watch/notify events */
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index f8f2359..1273db6 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2401,7 +2401,7 @@ bad:
*/
void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off,
struct ceph_snap_context *snapc, u64 snap_id,
- struct timespec *mtime)
+ struct vfs_time *mtime)
{
struct ceph_msg *msg = req->r_request;
void *p;
--
1.9.1