----- Forwarded message from David Miller <davem(a)davemloft.net> -----
Date: Sun, 17 Jan 2016 19:27:17 -0500 (EST)
From: David Miller <davem(a)davemloft.net>
To: amsfield22(a)gmail.com
Cc: mac(a)melware.de, isdn(a)linux-pingi.de, netdev(a)vger.kernel.org,
linux-kernel(a)vger.kernel.org, y2038(a)lists.linaro.org
Subject: Re: [PATCH v3] isdn: divamnt: use y2038-safe ktime_get_ts64() for
trace data timestamps
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
From: Alison Schofield <amsfield22(a)gmail.com>
Date: Fri, 15 Jan 2016 08:51:25 -0800
> divamnt stores a start_time at module init and uses it to calculate
> elapsed time. The elapsed time, stored in secs and usecs, is part of
...............snip
>
> Signed-off-by: Alison Schofield <amsfield22(a)gmail.com>
> Reviewed-by: Arnd Bergmann <arnd(a)arndb.de>
Please resubmit this when the net-next tree is open again.
Thank you.
----- End forwarded message -----
Arnd,
How do I know when the net-next tree is open?
And, I guess I need to rebase this on the net-next tree before I resend
- right?
Thanks!
Alison
Hi,
I was just going through your website and I see that your company is dealing
with open source software
So, would you be interested to acquire a list of Canonical and Ubuntu End
Users for your marketing initiatives.
We can also help you with the users' database of:
. Redhat
. Linux.
. Centos
. Mint
. Windows and more.
Information fields: Contact First Name, Last Name, Job Title, Email Address,
Phone Number, Fax Number, Company Name, Company Physical Address, and
Company Web Address, SIC Code, NAICS code, Primary Industry, Employee Size,
Revenue, Technology Type
Let me know if you are focused on any particular titles and application
users so that I can get back to you with all the relevant details.
Thank you & look forward to hearing from you.
Regards,
Tania Cuevas - Sr. Marketing Executive
___________________________________________________________________________
We respect your privacy. If you do not wish to receive future e-mail please
reply with "REMOVE
This patch replaces timeval with timespec64 as 32 bit 'struct timeval'
will not give current time beyond year 2038.
The patch changes the code to use ktime_get_real_ts64() which returns
a 'struct timespec64' instead of do_gettimeofday() which returns a
'struct timeval'
This patch also alters the format strings in sprintf() for now.tv_sec
and now.tv_nsec to incorporate 'long long' on 32 bit architectures and
leading zeroes respectively.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606(a)gmail.com>
Reviewed-by: Arnd Bergmann <arnd(a)arndb.de>
---
Changes in v2:
-change format string of now.tv_sec to '%llu'
-change format string of now.tv_nsec to '%.08lu'
Changes in v3:
-Replace tv_usec with tv_nsec, error made in v2
-Build tested
Changes in v4:
-Removed checkpatch.pl errors
drivers/misc/ibmasm/ibmasm.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
index 9b08344..25be44e 100644
--- a/drivers/misc/ibmasm/ibmasm.h
+++ b/drivers/misc/ibmasm/ibmasm.h
@@ -34,6 +34,7 @@
#include <linux/kref.h>
#include <linux/device.h>
#include <linux/input.h>
+#include <linux/time64.h>
/* Driver identification */
#define DRIVER_NAME "ibmasm"
@@ -53,9 +54,11 @@ extern int ibmasm_debug;
static inline char *get_timestamp(char *buf)
{
- struct timeval now;
- do_gettimeofday(&now);
- sprintf(buf, "%lu.%lu", now.tv_sec, now.tv_usec);
+ struct timespec64 now;
+
+ ktime_get_real_ts64(&now);
+ sprintf(buf, "%llu.%.08lu", (long long)now.tv_sec,
+ now.tv_nsec / NSEC_PER_USEC);
return buf;
}
--
1.9.1
You have received a new fax.
You can find your fax document in the attachment.
Quality: 100 DPI
Date: Mon, 8 Feb 2016 07:59:25 +0300
File size: 215 Kb
Pages sent: 8
Filename: task-00000320199.doc
Scanned in: 53 seconds
Sender: Henry Pace
Thanks for choosing Interfax!
Introduction
This patch series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC
macros.
The idea for the series evolved from my discussions with Arnd Bergmann.
This was originally part of the RFC series[2]:
https://lkml.org/lkml/2016/1/7/20 (under discussion).
Dave Chinner suggested moving bug fixes out of the feature series to keep the
original series simple.
There are 354 occurrences of the the above macros in the kernel.
The series will be divided into 4 or 5 parts to keep the parts manageable
and so that each part could be reviewed and merged independently.
This is part 1 of the series.
Motivation
The macros: CURRENT_TIME and CURRENT_TIME_SEC are primarily used for
filesystem timestamps.
But, they are not accurate as they do not perform clamping according to
filesystem timestamps ranges, nor do they truncate the nanoseconds value
to the granularity as required by the filesystem.
The series is also viewed as an ancillary to another upcoming series[2]
that attempts to transition file system timestamps to use 64 bit time to
make these y2038 safe.
There will also be another series[3] to add range checks and clamping to
filesystem time functions that are meant to substitute the above macros.
Solution
CURRENT_TIME macro has an equivalent function:
struct timespec current_fs_time(struct super_block *sb)
These will be the changes to the above function:
1. Function will return the type y2038 safe timespec64 in [2].
2. Function will use y2038 safe 64 bit functions in [2].
3. Function will be extended to perform range checks in [3].
A new function will be added to substitute for CURRENT_TIME_SEC macro
in the current series:
struct timespec current_fs_time_sec(void)
These will be the changes to the above function:
1. Function will return the type y2038 safe timespec64 in [2].
2. Function will use y2038 safe 64 bit functions in [2].
3. Function will be extended to perform range checks in [3].
Any use of these macros outside of filesystem timestamps will
be replaced by function calls to appropriate time functions.
Deepa Dinamani (10):
fs: Add current_fs_time_sec() function
vfs: Replace CURRENT_TIME by current_fs_time()
fs: cifs: Replace CURRENT_TIME with current_fs_time()
fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts()
fs: cifs: Replace CURRENT_TIME by get_seconds
fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec()
fs: ext4: Replace CURRENT_TIME with ext4_current_time()
fs: ceph: replace CURRENT_TIME by current_fs_time()
fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts()
fs: btrfs: Replace CURRENT_TIME by current_fs_time()
fs/btrfs/file.c | 4 ++--
fs/btrfs/inode.c | 25 +++++++++++++------------
fs/btrfs/ioctl.c | 8 ++++----
fs/btrfs/root-tree.c | 2 +-
fs/btrfs/transaction.c | 7 +++++--
fs/btrfs/xattr.c | 2 +-
fs/ceph/file.c | 4 ++--
fs/ceph/inode.c | 2 +-
fs/ceph/mds_client.c | 2 +-
fs/ceph/xattr.c | 4 ++--
fs/cifs/cifsencrypt.c | 4 +++-
fs/cifs/cifssmb.c | 10 +++++-----
fs/cifs/inode.c | 15 +++++++--------
fs/ext4/ext4.h | 2 +-
fs/ext4/super.c | 2 +-
fs/libfs.c | 21 +++++++++++++--------
fs/nsfs.c | 3 ++-
fs/pipe.c | 3 ++-
fs/posix_acl.c | 2 +-
include/linux/fs.h | 5 +++++
20 files changed, 72 insertions(+), 55 deletions(-)
--
1.9.1