Linux bcache driver list
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Kent Overstreet <kent.overstreet@gmail.com>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Jens Axboe <axboe@kernel.dk>, Michael Lyle <mlyle@lyle.org>,
	Tang Junhui <tang.junhui@zte.com.cn>,
	Hannes Reinecke <hare@suse.com>,
	Bart Van Assche <bart.vanassche@wdc.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-bcache@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bcache: stop using the deprecated get_seconds()
Date: Thu, 21 Jun 2018 00:52:34 +0800	[thread overview]
Message-ID: <55942b2f-c6a3-e708-3cd3-504071e80cf8@suse.de> (raw)
In-Reply-To: <CAK8P3a1S4mRH5jkpv3ecKhEkHUH5799uEF6eq_wBx7Z07NqVWA@mail.gmail.com>

On 2018/6/21 12:20 AM, Arnd Bergmann wrote:
> On Wed, Jun 20, 2018 at 5:51 PM, Coly Li <colyli@suse.de> wrote:
>> On 2018/6/20 5:51 PM, Arnd Bergmann wrote:
>>> bcache uses get_seconds() to read the current system time and store it in
>>> the superblock as well as in uuid_entry structures that are user visible.
>>>
>>> This changes over from the deprecated function to
>>> ktime_get_real_seconds(), which returns a 64-bit timestamp as it
>>> should. Unfortunately, the two structures are still limited to 32 bits,
>>> so this won't fix any real problems. Let's at least document that
>>> properly, in case we get an updated format in the future it can be
>>> fixed. Until then, we still have some time, and checking the tools
>>> at https://github.com/koverstreet/bcache-tools reveals no access to
>>> any of them.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Hi Arnd,
>>
>> Firstly thanks to your patch, especially the detailed information in
>> patch log, it helps me to understand the problem more easier.
>>
>> From the information, it seems the problem is current 32bit time stamp
>> will be overflow in 2106. So it will be 88 years later, which I have to
>> say I don't care.
>>
>> Also for get_seconds() which works well for current code as many other
>> places call it, I would like to keep it.
> 
> I'm currently in the process of removing all instances of get_seconds()
> with patches like this. In many cases, we actually want to use
> ktime_get_seconds() to return a monotonic time that is immune
> to concurrent setttimeofday() calls, in others the code needs to be
> changed to avoid the y2038 overflow. For bcache, we don't
> really need either of them, but I'd still want to move over everything
> to ktime_get_* based interfaces.
> 

Hi Arnd,

Oh I see. Now I agree with you, and no more concern. Thanks for your
explaining.

> Should I clarify that motivation in the changelog text further?
> 

Yes please, that will be great.

> I can also do a simple replacement of get_seconds() with
> ktime_get_real_seconds() throughout bcache instead of
> adding the intermediate helper function.

Yes please, it will be better IMHO.

Thanks.

Coly Li

      reply	other threads:[~2018-06-20 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  9:51 [PATCH] bcache: stop using the deprecated get_seconds() Arnd Bergmann
2018-06-20 15:51 ` Coly Li
2018-06-20 16:20   ` Arnd Bergmann
2018-06-20 16:52     ` Coly Li [this message]

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=55942b2f-c6a3-e708-3cd3-504071e80cf8@suse.de \
    --to=colyli@suse.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=bart.vanassche@wdc.com \
    --cc=hare@suse.com \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlyle@lyle.org \
    --cc=tang.junhui@zte.com.cn \
    --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