lkml.org 
[lkml]   [2016]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
Date


On 6/9/16, 01:05, "Deepa Dinamani" <deepa.kernel@gmail.com> wrote:

>boot_time is represented as a struct timespec.
>struct timespec and CURRENT_TIME are not y2038 safe.
>Overall, the plan is to use timespec64 for all internal
>kernel representation of timestamps.
>CURRENT_TIME will also be removed.
>Use struct timespec64 to represent boot_time.
>And, ktime_get_real_ts64() for the boot_time value.
>
>boot_time is used to construct the nfs client boot verifier.
>This will now wrap in 2106 instead of 2038 on 32-bit systems.
>The server only relies on the value being persistent until
>reboot so the wrapping should be fine.

We really do not give a damn about wraparound here, since the boot time is only ever compared for an exact match, and the odds of two reboots occurring exactly 2^32 * 10^9 nanoseconds apart are cosmically small...

If struct timespec is going away, can we just convert this into a ktime_t?

Trond

\
 
 \ /
  Last update: 2016-06-09 22:01    [W:0.798 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site