Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp998461imm; Wed, 20 Jun 2018 09:54:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJfMlB56gscwrjNHJWz2zessIWWBn4u1SPvbRVTWeNdAXrh0pXTRcyMQaqyT3lXZmJpgIV8 X-Received: by 2002:a17:902:7442:: with SMTP id e2-v6mr25041932plt.28.1529513645694; Wed, 20 Jun 2018 09:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529513645; cv=none; d=google.com; s=arc-20160816; b=dJzz54L1i3y74bsJ4p3Xnx4NlfzlSr0UENiaI89NK0fh3upiLsqbGnruBZ69cp+QW7 DSirWwBhL/wYDZbO1KAJsWe9fOfYcDz4GuWdF5glbTut+DYeqXbhtNGHd5G2CFWy0PI1 S8A/spTbxe1PIRTcpGjRvGoElLOra3qB/2XFy4O7llvWqq/3RMXekTCCzvxkZLFZqcyw wNtLDtrQXEO06tePBTAXygrfi+aTXQJ4HP8wk0TOi93QOwYvDc61ueAICJ8uXGQ/blgT V0xPKw4DHWXM6JCSZpW1YGTKjS0jdI0LZ/4hMkhqrqinEp7qZuy9PQTdb0FI/F7I3TlF iS8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=n6EKZKgaGdnZ+2xpFJ1H0ILWICOsuocevGCgZE8T1CU=; b=tFCRd1/80jwEbhgAuM3HhsQOFMNfJkAYcIEYl268IIQyDP4K3edBT5bpJ3J8gCu+5M R477dm7OMA2mslm0ryohyhTRVlldjiK67kgbBErd0Ew63xpIENf/j871A8wNpGCNtiOl 7lXzi3uO+jdW6z6P0X/9XGTPyqhtT6rdJqGL+zu3z8jpz6i8ohDvTGXw1dm+h+sPK1Vp krIfs2NMv4rsTKWoWJ3wsyydozL24JRQzh6+1oaYyJNOiCaIoR1gj2q2GhRob0/bZatc Q8pS24r2DPiJLqt7wopV9Uba3MevlPQ5/GqZfvCT4KKSSY/f3AwYoMOhHakuqocTIzZU UluQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22-v6si2830975pls.147.2018.06.20.09.53.51; Wed, 20 Jun 2018 09:54:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932554AbeFTQww (ORCPT + 99 others); Wed, 20 Jun 2018 12:52:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:41616 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932177AbeFTQwv (ORCPT ); Wed, 20 Jun 2018 12:52:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7FCD3ACEA; Wed, 20 Jun 2018 16:52:49 +0000 (UTC) Subject: Re: [PATCH] bcache: stop using the deprecated get_seconds() To: Arnd Bergmann Cc: Kent Overstreet , y2038 Mailman List , Jens Axboe , Michael Lyle , Tang Junhui , Hannes Reinecke , Bart Van Assche , Andy Shevchenko , linux-bcache@vger.kernel.org, Linux Kernel Mailing List References: <20180620095228.3686471-1-arnd@arndb.de> <5ffd5433-6bb3-71a8-2b33-ceef50ddf6d7@suse.de> From: Coly Li Openpgp: preference=signencrypt Autocrypt: addr=colyli@suse.de; prefer-encrypt=mutual; keydata= xsFNBFYX6S8BEAC9VSamb2aiMTQREFXK4K/W7nGnAinca7MRuFUD4JqWMJ9FakNRd/E0v30F qvZ2YWpidPjaIxHwu3u9tmLKqS+2vnP0k7PRHXBYbtZEMpy3kCzseNfdrNqwJ54A430BHf2S GMVRVENiScsnh4SnaYjFVvB8SrlhTsgVEXEBBma5Ktgq9YSoy5miatWmZvHLFTQgFMabCz/P j5/xzykrF6yHo0rHZtwzQzF8rriOplAFCECp/t05+OeHHxjSqSI0P/G79Ll+AJYLRRm9til/ K6yz/1hX5xMToIkYrshDJDrUc8DjEpISQQPhG19PzaUf3vFpmnSVYprcWfJWsa2wZyyjRFkf J51S82WfclafNC6N7eRXedpRpG6udUAYOA1YdtlyQRZa84EJvMzW96iSL1Gf+ZGtRuM3k49H 1wiWOjlANiJYSIWyzJjxAd/7Xtiy/s3PRKL9u9y25ftMLFa1IljiDG+mdY7LyAGfvdtIkanr iBpX4gWXd7lNQFLDJMfShfu+CTMCdRzCAQ9hIHPmBeZDJxKq721CyBiGAhRxDN+TYiaG/UWT 7IB7LL4zJrIe/xQ8HhRO+2NvT89o0LxEFKBGg39yjTMIrjbl2ZxY488+56UV4FclubrG+t16 r2KrandM7P5RjR+cuHhkKseim50Qsw0B+Eu33Hjry7YCihmGswARAQABzRhDb2x5IExpIDxj b2x5bGlAc3VzZS5kZT7CwX8EEwEIACkFAlYX6ZACGyMFCQlmAYAHCwkIBwMCAQYVCAIJCgsE FgIDAQIeAQIXgAAKCRDHOQeTa334/CncD/9B97EIjcDOm0TS164bpMlsbZWEm8GQnV6nVzm8 QsywPRM8S8nqkqX1atTYl/fTdJsasH8mgryUqL0eHBPs5RmJhDk3YgYsTrzbOjMdsdRwv24W J5RXdulRag2XDPIhSP7rWsOSh66gljdAp8XQQZD0zFXi4IytoAuLtx8RMjzzKk1iP6uz8MIv em7iFu6NYcHd3cmvSPo7CnBVaG0dZ6P2p2gS7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5urUcRGAQYlQ0GWKju97LYE2cq5McpFG0CMvDyPoO1zAwjJz4g53EK oH/eikd3L8OMDfEK4AOsUaPMTnNgt1+40zEFMrQs/dDMldUAEQEAAcLBZQQYAQgADwUCVhfp LwIbDAUJCWYBgAAKCRDHOQeTa334/PtREACDN8W/pHeHyPW/mTt6MEe/GICG5YdlBW5ft7HY Cf6rTz+uLZolGc5SYKuJJ0JC/L2Ifh3BWmwLIOxV868KB3oEfmGszBY+4n/icLyIEAkkthBb 2V5sP5KgB3bOg7mSFBxfHi2pyO9K9d+Lr+UkORjCGyV33QFrcN+OQdPDactontnQglB7xm2K phGWqxoqepHCqFIulZ3yKGhQhmdpyz0J19Ry6GkxPE85MG/NC98D5+4Yn/V3G+yZpbGsuFhE CP26JvdXh1jNCUdU46pEjZwu0GXBIo6r1cb1v+swfYB86NeFUHWtvxamh8i6RBl1FLDhN6xb r9f7M++xoADyzPQYQPQUxWK+iG6lz3qVVq5312z/is3fcdyESPNs09DMT43xCCBr9UOMq6dZ IC9EsSeMYv4librfuSRqH4R0MuVbVWLJFg/Q7s+nbPb2YjhqIYr51hBDyXpzUDoIz43maIPk UmCNKa43mNFktMrwU21J5lVXEwBuTY6JlHOAl0Fgo28X+eTa8fx2Uiz9OVgWe03ebJGIGowe XTgqVWJMsKM1tmW+QFmgtczDGRYCZ6OQYpqt0SoTg1yx5MN4RzUtlLka2qLfPiOGUUN3qNJ5 nP+spvF+s+dHtLjjhy7AL86N01a6S0rwaClVVv0XTucvIntwccIx0CZfUKlfn5BWnB64Ig== Message-ID: <55942b2f-c6a3-e708-3cd3-504071e80cf8@suse.de> Date: Thu, 21 Jun 2018 00:52:34 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/6/21 12:20 AM, Arnd Bergmann wrote: > On Wed, Jun 20, 2018 at 5:51 PM, Coly Li 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 >> >> 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