Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] afs: use a consistent interpretation of time values | Date | Wed, 20 Jun 2018 11:53:36 +0100 |
| |
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
| |