linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Jan Kara <jack@suse.com>
Subject: Re: [PATCH 5/6] udf: Simplify calls to udf_disk_stamp_to_time
Date: Tue, 15 May 2018 10:48:11 -0700	[thread overview]
Message-ID: <CABeXuvqso4mbFMmTnScwtxpNFYRGT8AoEdA=KKfBmOFMPGpWzQ@mail.gmail.com> (raw)
In-Reply-To: <20180514135759.r4jxnw7mp3h6ak36@quack2.suse.cz>

On Mon, May 14, 2018 at 6:57 AM, Jan Kara <jack@suse.cz> wrote:
> Hello,
>
> On Fri 11-05-18 21:59:20, Deepa Dinamani wrote:
>> Subsequent patches in the series convert inode timestamps
>> to use struct timespec64 instead of struct timespec as
>> part of solving the y2038 problem.
>>
>> commit fd3cfad374d4 ("udf: Convert udf_disk_stamp_to_time() to use mktime64()")
>> eliminated the NULL return condition from udf_disk_stamp_to_time().
>> udf_time_to_disk_time() is always called with a valid dest pointer and
>> the return value is ignored.
>> Further, caller can as well check the dest pointer being passed in rather
>> than return argument.
>> Make both the functions return void.
>>
>> This will make the inode timestamp conversion simpler.
>>
>> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
>> Cc: jack@suse.com
>
> I'm fine with this. Just one bug below:
>
>> diff --git a/fs/udf/super.c b/fs/udf/super.c
>> index 0d27d41f5c6e..bd0ae64bc31c 100644
>> --- a/fs/udf/super.c
>> +++ b/fs/udf/super.c
>> @@ -862,6 +862,9 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
>>       struct buffer_head *bh;
>>       uint16_t ident;
>>       int ret = -ENOMEM;
>> +#ifdef UDFFS_DEBUG
>> +     struct timestamp *ts;
>> +#endif
>>
>>       outstr = kmalloc(128, GFP_NOFS);
>>       if (!outstr)
>> @@ -880,15 +883,14 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
>>
>>       pvoldesc = (struct primaryVolDesc *)bh->b_data;
>>
>> -     if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time,
>> -                           pvoldesc->recordingDateAndTime)) {
>> +     udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time,
>> +                           pvoldesc->recordingDateAndTime);
>>  #ifdef UDFFS_DEBUG
>> -             struct timestamp *ts = &pvoldesc->recordingDateAndTime;
>> -             udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n",
>> -                       le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
>> -                       ts->minute, le16_to_cpu(ts->typeAndTimezone));
>> +     *ts = &pvoldesc->recordingDateAndTime;
>
> This should be 'ts ='.

Thanks, I will fix this in v2.

> Do you prefer me taking this patch through my tree or will you carry it as
> a part of your series?

I can carry the patch as part of the series.

-Deepa

  reply	other threads:[~2018-05-15 17:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12  4:59 [PATCH 0/6] Transition vfs to 64-bit timestamps Deepa Dinamani
2018-05-12  4:59 ` [PATCH 1/6] fs: add timespec64_truncate() Deepa Dinamani
2018-05-12  4:59 ` [PATCH 2/6] lustre: Use long long type to print inode time Deepa Dinamani
2018-05-12  4:59 ` [PATCH 3/6] ceph: make inode time prints to be long long Deepa Dinamani
2018-05-12  4:59 ` [PATCH 4/6] fs: nfs: get rid of memcpys for inode times Deepa Dinamani
2018-05-12  4:59 ` [PATCH 5/6] udf: Simplify calls to udf_disk_stamp_to_time Deepa Dinamani
2018-05-14 13:57   ` Jan Kara
2018-05-15 17:48     ` Deepa Dinamani [this message]
2018-05-12  4:59 ` [PATCH 6/6] vfs: change inode times to use struct timespec64 Deepa Dinamani
2018-05-12  6:44   ` Kees Cook
2018-05-14  4:05     ` Deepa Dinamani
2018-05-14 16:30       ` Kees Cook
2018-05-14 17:25         ` Deepa Dinamani
2018-05-14 17:53           ` Kees Cook
2018-05-14 18:23             ` Deepa Dinamani
2018-05-14 18:28               ` Kees Cook
2018-05-17  1:13               ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABeXuvqso4mbFMmTnScwtxpNFYRGT8AoEdA=KKfBmOFMPGpWzQ@mail.gmail.com' \
    --to=deepa.kernel@gmail.com \
    --cc=arnd@arndb.de \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).