[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABeXuvp-ikTN41zqQv9fQR9Su3rLyVMZgPeZuVZs_tEdg1eDow@mail.gmail.com>
Date: Wed, 22 Jun 2016 18:59:19 -0700
From: Deepa Dinamani <deepa.kernel@...il.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: y2038 Mailman List <y2038@...ts.linaro.org>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.com>, Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [Y2038] [PATCH v2 09/24] fs: udf: Replace CURRENT_TIME with current_time()
On Wed, Jun 22, 2016 at 6:54 AM, Arnd Bergmann <arnd@...db.de> wrote:
> On Sunday, June 19, 2016 5:27:08 PM CEST Deepa Dinamani wrote:
>> mutex_lock(&sbi->s_alloc_mutex);
>> lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX;
>> lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX;
>> + ktime_get_real_ts(&ts);
>> udf_time_to_disk_stamp(&lvid->recordingDateAndTime,
>> - CURRENT_TIME);
>> + timespec_trunc(ts, sb->s_time_gran));
>> lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN);
>>
>> lvid->descTag.descCRC = cpu_to_le16(
>>
>
> I think we don't need the timespec_trunc here, and introducing the
> call might complicate matters in the future.
This was done so that it could be similar to inode timestamps
as both have same format and use same formatting functions.
> IMHO timespec_trunc() really only makes sense when assigning into
> an inode timestamp, whereas udf_time_to_disk_stamp() already truncates
> the resulting nanoseconds to microseconds.
I reconsidered our discussion.
I think you are correct.
I missed that the prints using microseconds format would actually
convert seconds
also to microseconds and not just nanoseconds.
I will remove the timespec_trunc here and post a v3.
Thanks,
-Deepa
Powered by blists - more mailing lists