From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752970AbcFJOD4 (ORCPT ); Fri, 10 Jun 2016 10:03:56 -0400 Received: from us-smtp-delivery-194.mimecast.com ([216.205.24.194]:48557 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbcFJODy (ORCPT ); Fri, 10 Jun 2016 10:03:54 -0400 From: Trond Myklebust To: Anna Schumaker , Deepa Dinamani CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Thomas Gleixner , Al Viro , Linus Torvalds , "y2038@lists.linaro.org" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Thread-Topic: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Thread-Index: AQHRwgyhy4gw6l+dB0u0MAW8csgWrZ/hQbyAgABg5YCAAQzfgP//yteA Date: Fri, 10 Jun 2016 14:02:41 +0000 Message-ID: References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <1465448705-25055-19-git-send-email-deepa.kernel@gmail.com> <89EF59F9-52D2-4F37-A7A8-52BD0FF7E98E@primarydata.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [68.49.162.121] x-ms-office365-filtering-correlation-id: b516eecc-d607-4fe5-ac59-08d39137e36e x-microsoft-exchange-diagnostics: 1;BN3PR11MB0305;5:Owy5JzVcj9ZFgDSACdSPli7O9P1kc9f9VMUk+88VpSgOVsrtmtymlIyegjq18owGQFfxjhFDeONgtxoGh9rIcVQF3A0/+2JQWUh1bZVgNKI34KbGriX1DVQtIB+xpBRiYpYB1/hfR6ZqC34OJhoglA==;24:/Bauvwvv3GN6ODIXp4tFSPnIYWhqrYR5sUCLK66dSBB0mXgtbKOR5nTfCTVrHFkIL621xeZxXr2BNOF8sei9s5/+W6EsavCSoSX3UiWEcVE=;7:Xn6XUnLcbpARpJfoBZ7iuxhRarZIMYz4sXMjdkP22WwFhu3ZblOw6u1A6hiOlhNRaJ7fUAozHGZZEHulpejd1jC4vEbIhFoZ43/MJ1HIgcHzoCJAVEXCYHCYJYjMNchDiYAj3yuNnLHKrGxjRG31OzzixhIn5isBh8xY3GRHULegTnTSYKzlCjUcE0prHh+daNuozH4PHbKW3zWYQzu2Sw==;20:igk4+y9ZK+ReHkJZx+sBNB6iK4YW5EyT4/Cir2gaAk3rXttUEC4Rk08oApycNDLTCbSxkdd5vJevgnnp/kxF9Fo1fywP+SXuc9k72jKuNgGuRTomc8eCrtyeDgnzY5V/EXW5Uyl2wuWLYEYyf5QrgKHHLv+eg2EwEpgs1IIlfKs= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR11MB0305; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041072)(6043046);SRVR:BN3PR11MB0305;BCL:0;PCL:0;RULEID:;SRVR:BN3PR11MB0305; x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(199003)(189002)(377454003)(5002640100001)(92566002)(19580395003)(54356999)(81166006)(5004730100002)(586003)(189998001)(36756003)(33656002)(5001770100001)(19580405001)(82746002)(66066001)(122556002)(10400500002)(68736007)(97736004)(105586002)(2906002)(11100500001)(2950100001)(83716003)(106116001)(106356001)(87936001)(77096005)(101416001)(8676002)(81156014)(3280700002)(99286002)(4326007)(2900100001)(93886004)(8936002)(102836003)(3660700001)(5008740100001)(76176999)(86362001)(6116002)(50986999)(3846002)(104396002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR11MB0305;H:BN3PR11MB0305.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <305933E249AEF14A923A1811BF299B12@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: primarydata.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2016 14:02:41.1156 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 03193ed6-8726-4bb3-a832-18ab0d28adb7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR11MB0305 X-MC-Unique: cjHi70DmQTOADjtGKtSukg-1 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u5AE416e026708 On 6/10/16, 09:12, "Anna Schumaker" wrote: >On 06/09/2016 05:10 PM, Deepa Dinamani wrote: >>>> boot_time is represented as a struct timespec. >>>> struct timespec and CURRENT_TIME are not y2038 safe. >>>> Overall, the plan is to use timespec64 for all internal >>>> kernel representation of timestamps. >>>> CURRENT_TIME will also be removed. >>>> Use struct timespec64 to represent boot_time. >>>> And, ktime_get_real_ts64() for the boot_time value. >>>> >>>> boot_time is used to construct the nfs client boot verifier. >>>> This will now wrap in 2106 instead of 2038 on 32-bit systems. >>>> The server only relies on the value being persistent until >>>> reboot so the wrapping should be fine. >>> >>> We really do not give a damn about wraparound here, since the boot time is >>> only ever compared for an exact match, and the odds of two reboots occurring >>> exactly 2^32 * 10^9 nanoseconds apart are cosmically small... >>> If struct timespec is going away, can we just convert this into a ktime_t? >> >> timespec64 is the same as timespec already on 64 bit machines. >> But, yes, we can use ktime_t here. >> >> Did you mean the internal storage value or the wire boo_time used for verifier? >> In case you don't want to change the wire value, then we will have a division >> operation, every time the verifier needs to be sent. > >The verifier is mostly used during mounting, so we don't send too many of them. I don't think we need to worry about adding an extra division operation here, they're pretty cheap compared to making RPC calls! :) > The only requirement for the verifier is that it be unique, so changing the format is not a problem either. Cheers Trond