On Sunday 06 December 2015 22:04:04 Deepa Dinamani wrote:
The current representation of inode times in struct inode: struct timespec is not y2038 safe.
The 64 bit counterpart of struct timespec: struct timespec64 suffers from the shortcoming that the data type sizes are different on 32 bit and 64 bit systems.
Introduce a new struct inode_time to overcome the above limitations.
Also add time conversion api's between struct timespec64 and struct inode_time. This is required as the 64-bit time functions typically return struct timespec64 types.
I was hoping we could avoid adding another time type for the file systems. What is the problem with the different sizes in timespec64? Only the nanosecond portion is different, and we sanitize the values in there when coming from user space so we are guaranteed that the nanoseconds are zero or a positive less than 1 billion, so it always fits in either one.
Arnd