lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] afs: use a consistent interpretation of time values
Date
Arnd Bergmann <arnd@arndb.de> wrote:

> which avoids the y2038 overflow

No it doesn't. The AFS protocol is limited.

> + time64_t mtime_client; /* last time client changed data */
> + time64_t mtime_server; /* last time server changed data */
> ...
> - time_t creation; /* volume creation time */
> + time64_t creation; /* volume creation time */

Unless you can change the AFS protocol, this is a waste of memory. It might
be better to change them to u32 as they are protocol values rather than system
values.

> - inode->i_ctime.tv_sec = get_seconds();
> - inode->i_ctime.tv_nsec = 0;
> - inode->i_atime = inode->i_mtime = inode->i_ctime;
> + inode->i_ctime = inode->i_atime = inode->i_mtime = current_time(inode);

Surely, the tv_nsec should be zero since anything else cannot be represented
in the AFS protocol.

I will grant, however, I should be consistently using them as unsigned values.

Note that the answers to the above may change if and when I start supporting
the YFS protocol extensions, but for the AFS protocol, this is simply not
there.

David

\
 
 \ /
  Last update: 2018-06-20 12:54    [W:0.028 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site