From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934042AbcKJPC1 (ORCPT ); Thu, 10 Nov 2016 10:02:27 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:63175 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933808AbcKJPC0 (ORCPT ); Thu, 10 Nov 2016 10:02:26 -0500 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: "Dilger, Andreas" , James Simmons , "devel@driverdev.osuosl.org" , "Drokin, Oleg" , Linux Kernel Mailing List , Lustre Development List Subject: Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong Date: Thu, 10 Nov 2016 16:01:18 +0100 Message-ID: <5149342.oboLeYkUcs@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161110122108.GA7580@kroah.com> References: <1478573240-12850-1-git-send-email-jsimmons@infradead.org> <1594836.LAbS3nYoXQ@wuerfel> <20161110122108.GA7580@kroah.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:rNaIxtKCafST2UWhiBrYfP/LXh0+2z6iNgxBCHu30kuP4kFvJCY 6gFFBoGwddEUWBhhpmSArxYaEZU2411XfIrz2dFTD7C93E8KAUZAm1/HoA3/GsRmk/p4Y+Q vZvmd6IHBdmzftgh4T7zZlePlDkkF3jGkmKSCYlA+in+2JPx44UU/ykpYwgl6mqK/2Ev9sR s/e0TW86dpn+WmjQKHsEw== X-UI-Out-Filterresults: notjunk:1;V01:K0:K1DibX9z4rE=:5l4PQ+Ra8O+/PUWcRKMzkY ApIwBBUieLA7lQn1vf58BPG6VBxRsTMFdH0wotbVl0ieV0SlfEjEZwP9DLEEkSdIO7shKg7Kf G8cg9hIMa5i7yN6F72aIMbtALhzZxU7ktBPwy4CyFAyYxNSmVfiu2d1ypr94fOAEg27luCL7K nhySjwfZTL5ENxaqD7HVSFZzajyij9XklWQx67x7jwBaM4opPTaafIDgs4WdM4SVKNZ05JVyd x8ztksZ47QD86GDLpFolpiJcl6OlLb6AnUC4b6KfqDryXsBCIRjHdIw0OCSjrcsgSMJRpVwsN qRwA5Xd08uFlYXes2470t5aX57tkLerwyfm5a5AXP/KcU5OzXCALGp4RsgWEWeGD7xmr5omPS IoPSLxB35HSw35MiDG3u7XhRyrNwJVuxQh5fEEbXJg4q5c/QPDnbZyVk4BrbMlGebEmjbWk33 jqBbA+8h+aNkumQEIG/LvuV1CItpol5ouk2Ehiugdy45YM/hM/WPxA3eVRxBiQPXtQSJCiIOh 0LwjadnYylCaMnaJemVzhwhKVRx08iEG8Y090WBwzFaQ0kSIFVlLy9+/cPUJagZAhcINmCp88 SYJG7xlFTHi/9UQunwuDIH+xBVCvF0GbhtCKO0nLdhVUdgfjAeQvbJTmUD8ToJDU14RMWgW/q r38Vtw3QlpEovJYLWutBCOl3AfCG5H9y0rhCP4C9XBS7wpQebF8VAOLIVDn/1wqrIBlb/0V27 3qv7GMT60qd6zV/t Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, November 10, 2016 1:21:08 PM CET Greg Kroah-Hartman wrote: > > > > the intention here is simply to have the console log keep the > > same numbers as "date +%s" for absolute values. The patch that > > James suggested converting everything to ktime_get_seconds() > > would result in the same intervals that have always been there > > (until I broke it by using time domains inconsistently), but > > would mean we could use a u32 type for pl_recalc_time and > > pl_recalc_period because that doesn't overflow until 136 years > > after booting. (signed time_t overflows 68 years after 1970, > > i.e 2038). > > So, is this patch correct and should be merged to the tree, or not? > No, I think it's wrong in a different way as before. After my patch, there were six instances of ktime_get_real_seconds() and three instances of ktime_get_seconds(), and that was wrong. James's patch converts three of the six instances to ktime_get_seconds(), which is equally wrong, just different. We can either convert the six ktime_get_real_seconds() to ktime_get_seconds(), or convert the four (one was added in the meantime) ktime_get_seconds() to ktime_get_real_seconds(). I'll follow up with a patch for the latter as it is what I had originally intended. We can also do what James intended instead. Arnd