[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABeXuvoQJSg+eVH4LX5s87DtE4N3goKDnjZgJ9fLk8txgwN+QA@mail.gmail.com>
Date: Fri, 7 Apr 2017 19:16:54 -0700
From: Deepa Dinamani <deepa.kernel@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alexander Viro <viro@...iv.linux.org.uk>,
Greg KH <gregkh@...uxfoundation.org>, andreas.dilger@...el.com,
Arnd Bergmann <arnd@...db.de>,
"J. Bruce Fields" <bfields@...ldses.org>, Chris Mason <clm@...com>,
"David S. Miller" <davem@...emloft.net>,
David Sterba <dsterba@...e.com>,
Evgeniy Dushistov <dushistov@...l.ru>,
Eric Paris <eparis@...hat.com>,
Jaegeuk Kim <jaegeuk@...nel.org>, Josef Bacik <jbacik@...com>,
Jeff Layton <jlayton@...chiereds.net>,
John Stultz <john.stultz@...aro.org>,
James Simmons <jsimmons@...radead.org>,
Ingo Molnar <mingo@...hat.com>, oleg.drokin@...el.com,
Paul Moore <paul@...l-moore.com>, yuchao0@...wei.com,
ceph-devel <ceph-devel@...r.kernel.org>,
devel@...verdev.osuosl.org, linux-audit@...hat.com,
linux-btrfs <linux-btrfs@...r.kernel.org>,
linux-cifs@...r.kernel.org,
"Linux F2FS DEV, Mailing List"
<linux-f2fs-devel@...ts.sourceforge.net>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
linux-mtd <linux-mtd@...ts.infradead.org>,
LSM List <linux-security-module@...r.kernel.org>,
lustre-devel@...ts.lustre.org,
Linux Network Devel Mailing List <netdev@...r.kernel.org>,
samba-technical@...ts.samba.org,
y2038 Mailman List <y2038@...ts.linaro.org>
Subject: Re: [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe
>> - trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%ld.%09ld",
>> + trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%lld.%09ld",
>> field->seqnum,
>> field->duration,
>> field->outer_duration,
>> - field->timestamp.tv_sec,
>> + (long long)field->timestamp.tv_sec,
>
> Refresh my memory. We need the cast because on 64 bit boxes
> timestamp.tv_sec is just a long?
This is only required until we change the definition of timespec64.
Right now it is defined as
#if __BITS_PER_LONG == 64
# define timespec64 timespec
#else
struct timespec64 {
time64_t tv_sec;
long tv_nsec;
};
#endif
And timespec.tv_sec is just long int on 64 bit machines.
This is why we need the cast now.
We will probably change this and only define __kernel_timespec instead
of timespec, leaving only one definition of timespec64.
At that time, we will not need this.
-Deepa
Powered by blists - more mailing lists