Return-Path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:46458 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbdJSLEg (ORCPT ); Thu, 19 Oct 2017 07:04:36 -0400 MIME-Version: 1.0 In-Reply-To: <1508410486.4912.11.camel@redhat.com> References: <20171019100435.1170955-1-arnd@arndb.de> <1508410486.4912.11.camel@redhat.com> From: Arnd Bergmann Date: Thu, 19 Oct 2017 13:04:35 +0200 Message-ID: Subject: Re: [PATCH] nfds: avoid gettimeofday for nfssvc_boot time To: Jeff Layton Cc: y2038 Mailman List , "J. Bruce Fields" , Deepa Dinamani , Linux FS-devel Mailing List , Trond Myklebust , NeilBrown , Kinglong Mee , linux-nfs@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org List-ID: On Thu, Oct 19, 2017 at 12:54 PM, Jeff Layton 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: 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. > Reviewed-by: Jeff Layton Thanks. Arnd