mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dhowells@redhat.com, y2038@lists.linaro.org,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: use a consistent interpretation of time values
Date: Wed, 20 Jun 2018 11:53:36 +0100	[thread overview]
Message-ID: <5320.1529492016@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180620074647.4152617-1-arnd@arndb.de>

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

  reply	other threads:[~2018-06-20 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  7:46 Arnd Bergmann
2018-06-20 10:53 ` David Howells [this message]
2018-06-20 12:00   ` 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=5320.1529492016@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=anna.schumaker@netapp.com \
    --cc=arnd@arndb.de \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@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

Powered by JetHome