From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Linus Torvalds , Deepa Dinamani , Theodore Ts'o , Linux Kernel Mailing List , Andreas Dilger , Al Viro , linux-fsdevel , Thomas Gleixner , "linux-ext4@vger.kernel.org" Subject: Re: [Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Date: Sat, 11 Jun 2016 00:19:17 +0200 Message-ID: <3299877.khhcQSIs8Z@wuerfel> In-Reply-To: References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <1465448705-25055-3-git-send-email-deepa.kernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thursday, June 9, 2016 11:45:01 AM CEST Linus Torvalds wrote: > On Wed, Jun 8, 2016 at 10:04 PM, Deepa Dinamani wrote: > > CURRENT_TIME_SEC and CURRENT_TIME are not y2038 safe. > > current_fs_time() will be transitioned to be y2038 safe > > along with vfs. > > > > current_fs_time() returns timestamps according to the > > granularities set in the super_block. > > All existing users and all the ones in this patch (and the others too, > although I didn't go through them very carefully) really would prefer > just passing in the inode directly, rather than the superblock. > > So I don't want to add more users of this broken interface. It was a > mistake to use the superblock. The fact that the time granularity > exists there is pretty much irrelevant. If every single user wants to > use an inode pointer, then that is what the function should get. I guess it would help to give the function a new name in the process, if only to avoid possible conflicts. That new name of course needs to be at least as intuitive as the old one. How about struct timespec fs_timestamp(struct inode *); ? Arnd