Re: [PATCH] nfds: avoid gettimeofday for nfssvc_boot time

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

 



On Thu, Oct 19, 2017 at 01:04:35PM +0200, Arnd Bergmann wrote:
> On Thu, Oct 19, 2017 at 12:54 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> >
> > I wonder if we'd be better off just using nfssvc_boot.tv_sec as the
> > verifier? I don't see us ever calling that ktime_get_real_ts64 more than
> > once per second for this purpose, and that would eliminate wraparound.
> > That said, wraparound is not a huge concern here anyway, so this is
> > certainly fine for now:

It might reduce the chances of a collision if someone is doing extreme
boot-time optimization, or if time goes backwards for some reason?

> I now have the feeling that we had previously had the same discussion
> when someone else submitted a similar patch that ended up never getting
> merged. I might also be confusing this with a different subsystem that
> had the same requirement.
> 
> If we want this to be as unique as possible and also never (within
> a few hundred years) wrap, we could call ktime_get_real_ns(), which
> returns a 64-bit nanoseconds number.

Anyway, no objection to doing this differently if someone wants, but
I'll just take this patch for now.

Thanks.--b.

> 
> > Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
> 
> Thanks.
> 
>      Arnd



[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