[RFC v2a 09/12] fs: ceph: Change encode and decode functions to use vfs_time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Encode is used for iattr times, inode times and current
filesystem times.
Decode is mostly used for inode times.
Hence, these need to use vfs_time to switch to 64 bit times
along with vfs.

Decode is also used for keepalive times and processing
authentication tickets. Since inode times also use same functions
it is necessary to use vfs_time here as well.

Signed-off-by: Deepa Dinamani <deepa.kernel@xxxxxxxxx>
---
 include/linux/ceph/decode.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h
index 633a130..8139ed9 100644
--- a/include/linux/ceph/decode.h
+++ b/include/linux/ceph/decode.h
@@ -4,6 +4,7 @@
 #include <linux/err.h>
 #include <linux/bug.h>
 #include <linux/time.h>
+#include <linux/fs.h>
 #include <asm/unaligned.h>
 
 #include <linux/ceph/types.h>
@@ -132,16 +133,16 @@ bad:
 }
 
 /*
- * struct ceph_timespec <-> struct timespec
+ * struct ceph_timespec <-> struct vfs_time
  */
-static inline void ceph_decode_timespec(struct timespec *ts,
+static inline void ceph_decode_timespec(struct vfs_time *ts,
 					const struct ceph_timespec *tv)
 {
-	ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec);
-	ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec);
+	ts->tv_sec = (s64)(u32)le32_to_cpu(tv->tv_sec);
+	ts->tv_nsec = (long)(u32)le32_to_cpu(tv->tv_nsec);
 }
 static inline void ceph_encode_timespec(struct ceph_timespec *tv,
-					const struct timespec *ts)
+					const struct vfs_time *ts)
 {
 	tv->tv_sec = cpu_to_le32((u32)ts->tv_sec);
 	tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux