From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934177AbcFIHlg (ORCPT ); Thu, 9 Jun 2016 03:41:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:59958 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934159AbcFIHld (ORCPT ); Thu, 9 Jun 2016 03:41:33 -0400 Date: Thu, 9 Jun 2016 09:41:31 +0200 From: Jan Kara To: 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, Jan Kara Subject: Re: [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() Message-ID: <20160609074131.GB2790@quack2.suse.cz> References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <1465448705-25055-7-git-send-email-deepa.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465448705-25055-7-git-send-email-deepa.kernel@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 08-06-16 22:04:50, Deepa Dinamani wrote: > CURRENT_TIME is not y2038 safe. > > CURRENT_TIME macro is also not appropriate for filesystems > as it doesn't use the right granularity for filesystem > timestamps. > > Logical Volume Integrity format is described to have the > same timestamp format for "Recording Date and time" as > the other [a,c,m]timestamps. > Hence using current_fs_time() instead here promises to > maintain the same granularity as other timestamps. > > This is also in preparation for the patch that transitions > vfs timestamps to use 64 bit time and hence make them > y2038 safe. As part of the effort current_fs_time() will be > extended to do range checks. Just one nit below. > @@ -2030,7 +2030,7 @@ static void udf_close_lvid(struct super_block *sb) > mutex_lock(&sbi->s_alloc_mutex); > lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; > lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; > - udf_time_to_disk_stamp(&lvid->recordingDateAndTime, CURRENT_TIME); > + udf_time_to_disk_stamp(&lvid->recordingDateAndTime, current_fs_time(sb)); > if (UDF_MAX_WRITE_VERSION > le16_to_cpu(lvidiu->maxUDFWriteRev)) > lvidiu->maxUDFWriteRev = cpu_to_le16(UDF_MAX_WRITE_VERSION); > if (sbi->s_udfrev > le16_to_cpu(lvidiu->minUDFReadRev)) Please wrap this line properly so that it does not exceed 80 characters. Other than that feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR