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,
	linux-cachefs@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cachefiles: avoid deprecated get_seconds()
Date: Wed, 20 Jun 2018 11:58:31 +0100	[thread overview]
Message-ID: <5489.1529492311@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180620083339.766780-1-arnd@arndb.de>

Arnd Bergmann <arnd@arndb.de> wrote:

> -	sprintf(nbuffer, "%08x%08x",
> -		(uint32_t) get_seconds(),
> +	sprintf(nbuffer, "%08llx%08x",
> +		(uint64_t) ktime_get_real_seconds(),

It's not necessary to expand the 'time' field of the name.  It's not
interpreted by userspace, it's just there to prevent collisions when moving
directories about.  If your cache goes weird in the future because there was a
collision with an object that was moved to the graveyard 68 years ago and not
cleaned up, then that's probably a bug in cachefilesd.

But I've no objection to using ktime_get_real_seconds() and truncating the
value.

David

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  8:31 Arnd Bergmann
2018-06-20 10:58 ` David Howells [this message]
2018-06-20 12:03   ` Arnd Bergmann
2018-06-20 12:18   ` David Howells

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=5489.1529492311@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=arnd@arndb.de \
    --cc=linux-cachefs@redhat.com \
    --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

all inboxes | Powered by JetHome®