linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Bruce Fields <bfields@fieldses.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	y2038 Mailman List <y2038@lists.linaro.org>
Subject: Re: [PATCH v2 10/12] nfsd: use boottime for lease expiry alculation
Date: Fri, 13 Dec 2019 22:09:48 +0100	[thread overview]
Message-ID: <CAK8P3a3W3o6K_BGPaDre29Y1v=ZUMVv4+_mJr68vNkppKuuZrA@mail.gmail.com> (raw)
In-Reply-To: <BBB37836-D835-4EB7-8593-080BF60BDA38@oracle.com>

On Fri, Dec 13, 2019 at 7:23 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> > On Dec 13, 2019, at 11:40 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Fri, Dec 13, 2019 at 5:26 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> >>> On Dec 13, 2019, at 9:10 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> >>> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> >>> index 24534db87e86..508d7c6c00b5 100644
> >
> > With the old code, dividing by 10 was always fast as
> > nn->nfsd4_lease was the size of an integer register. Now it
> > is 64 bit wide, and I check that truncating it to 32 bit again
> > is safe.
>
> OK. That comment should state this reason rather than just repeating
> what the code does. ;-)

I changed the comment now to:

+       /*
+        * nfsd4_lease is set to at most one hour in __nfsd4_write_time,
+        * so we can use 32-bit math on it. Warn if that assumption
+        * ever stops being true.
+        */

Modified branch pushed to
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git y2038-nfsd-v2

        Arnd

  reply	other threads:[~2019-12-13 21:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 14:10 [PATCH v2 00/12] nfsd: avoid 32-bit time_t Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 01/12] nfsd: use ktime_get_seconds() for timestamps Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 02/12] nfsd: print 64-bit timestamps in client_info_show Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 03/12] nfsd: handle nfs3 timestamps as unsigned Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 04/12] nfsd: use timespec64 in encode_time_delta Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 05/12] nfsd: make 'boot_time' 64-bit wide Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 06/12] nfsd: pass a 64-bit guardtime to nfsd_setattr() Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 07/12] nfsd: use time64_t in nfsd_proc_setattr() check Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 08/12] nfsd: fix delay timer on 32-bit architectures Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 09/12] nfsd: fix jiffies/time_t mixup in LRU list Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 10/12] nfsd: use boottime for lease expiry alculation Arnd Bergmann
2019-12-13 16:26   ` Chuck Lever
2019-12-13 16:40     ` Arnd Bergmann
2019-12-13 18:23       ` Chuck Lever
2019-12-13 21:09         ` Arnd Bergmann [this message]
2019-12-13 21:13         ` Bruce Fields
2019-12-13 21:19           ` Arnd Bergmann
2019-12-20  2:57   ` J. Bruce Fields
2019-12-13 14:10 ` [PATCH v2 11/12] nfsd: use ktime_get_real_seconds() in nfs4_verifier Arnd Bergmann
2019-12-13 14:10 ` [PATCH v2 12/12] nfsd: remove nfs4_reset_lease() declarations Arnd Bergmann
2019-12-18 17:21 ` [PATCH v2 00/12] nfsd: avoid 32-bit time_t Arnd Bergmann
2019-12-18 17:24   ` J. Bruce Fields
2019-12-18 18:05     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a3W3o6K_BGPaDre29Y1v=ZUMVv4+_mJr68vNkppKuuZrA@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).