* [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros
@ 2016-06-09 5:04 Deepa Dinamani
2016-06-09 5:05 ` [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani
2016-06-09 7:51 ` [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Felipe Balbi
0 siblings, 2 replies; 7+ messages in thread
From: Deepa Dinamani @ 2016-06-09 5:04 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds, y2038,
Anna Schumaker, Anton Vorontsov, Benny Halevy, Boaz Harrosh,
Changman Lee, Chris Mason, Colin Cross, Dave Kleikamp,
David S. Miller, David Sterba, Eric Van Hensbergen, Felipe Balbi,
Hugh Dickins, Ian Kent, Jaegeuk Kim, Joern Engel, Josef Bacik,
Kees Cook, Latchesar Ionkov, Matt Fleming, Matthew Garrett,
Miklos Szeredi, Nadia Yvette Chambers, Prasad Joshi,
Robert Richter, Ron Minnich, Tony Luck, Trond Myklebust, autofs,
cluster-devel, jfs-discussion, linux-btrfs, linux-efi,
linux-f2fs-devel, linux-mm, linux-nfs, linux-nilfs, linuxppc-dev,
linux-rdma, linux-s390, linux-security-module, linux-usb, logfs,
netdev, ocfs2-devel, oprofile-list, osd-dev, selinux,
v9fs-developer
The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros.
The macros are not y2038 safe. There is no plan to transition them into being
y2038 safe.
ktime_get_* api's can be used in their place. And, these are y2038 safe.
All filesystem timestamps use current_fs_time() for the right granularity
as mentioned in the respective commit texts of patches.
This series also serves as a preparatory series to transition vfs to 64 bit
timestamps as outlined here: https://lkml.org/lkml/2016/2/12/104 .
As per Linus's suggestion in https://lkml.org/lkml/2016/5/24/663 , all the
inode timestamp changes have been squashed into a single patch. Also,
current_fs_time() now is used as a single generic filesystem timestamp api.
Posting all patches together in a bigger series so that the big picture is
clear.
As per the suggestion in https://lwn.net/Articles/672598/ , CURRENT_TIME
macro bug fixes are being handled in a series separate from transitioning
vfs to use 64 bit timestamps.
Some reviewers have requested not to change line wrapping only for the
longer function call names, so checkpatch warnings for such cases are
ignored in the patch series.
Deepa Dinamani (21):
fs: Replace CURRENT_TIME_SEC with current_fs_time()
fs: ext4: Use current_fs_time() for inode timestamps
fs: ubifs: Use current_fs_time() for inode timestamps
fs: Replace CURRENT_TIME with current_fs_time() for inode timestamps
fs: jfs: Replace CURRENT_TIME_SEC by current_fs_time()
fs: udf: Replace CURRENT_TIME with current_fs_time()
fs: cifs: Replace CURRENT_TIME by current_fs_time()
fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts()
fs: cifs: Replace CURRENT_TIME by get_seconds
fs: f2fs: Use ktime_get_real_seconds for sit_info times
drivers: staging: lustre: Replace CURRENT_TIME with current_fs_time()
block: rbd: Replace non inode CURRENT_TIME with current_fs_time()
fs: ocfs2: Use time64_t to represent orphan scan times
fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds()
time: Add time64_to_tm()
fnic: Use time64_t to represent trace timestamps
audit: Use timespec64 to represent audit timestamps
fs: nfs: Make nfs boot time y2038 safe
libceph: Remove CURRENT_TIME references
libceph: Replace CURRENT_TIME with ktime_get_real_ts
time: Delete CURRENT_TIME_SEC and CURRENT_TIME macro
arch/powerpc/platforms/cell/spufs/inode.c | 2 +-
arch/s390/hypfs/inode.c | 4 +--
drivers/block/rbd.c | 2 +-
drivers/infiniband/hw/qib/qib_fs.c | 2 +-
drivers/misc/ibmasm/ibmasmfs.c | 2 +-
drivers/oprofile/oprofilefs.c | 2 +-
drivers/scsi/fnic/fnic_trace.c | 4 +--
drivers/scsi/fnic/fnic_trace.h | 2 +-
drivers/staging/lustre/lustre/llite/llite_lib.c | 17 ++++++-----
drivers/staging/lustre/lustre/llite/namei.c | 4 +--
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 ++--
.../lustre/lustre/obdclass/linux/linux-obdo.c | 6 ++--
drivers/staging/lustre/lustre/obdclass/obdo.c | 6 ++--
drivers/staging/lustre/lustre/osc/osc_io.c | 2 +-
drivers/usb/core/devio.c | 19 ++++++------
drivers/usb/gadget/function/f_fs.c | 2 +-
drivers/usb/gadget/legacy/inode.c | 2 +-
fs/9p/vfs_inode.c | 2 +-
fs/adfs/inode.c | 2 +-
fs/affs/amigaffs.c | 6 ++--
fs/affs/inode.c | 2 +-
fs/afs/inode.c | 3 +-
fs/autofs4/inode.c | 2 +-
fs/autofs4/root.c | 19 +++++++-----
fs/bfs/dir.c | 18 ++++++-----
fs/btrfs/inode.c | 2 +-
fs/cifs/cifsencrypt.c | 4 ++-
fs/cifs/cifssmb.c | 10 +++----
fs/cifs/inode.c | 15 +++++-----
fs/coda/dir.c | 2 +-
fs/coda/file.c | 2 +-
fs/coda/inode.c | 2 +-
fs/devpts/inode.c | 6 ++--
fs/efivarfs/inode.c | 2 +-
fs/exofs/dir.c | 9 +++---
fs/exofs/inode.c | 7 +++--
fs/exofs/namei.c | 6 ++--
fs/ext2/acl.c | 2 +-
fs/ext2/dir.c | 6 ++--
fs/ext2/ialloc.c | 2 +-
fs/ext2/inode.c | 4 +--
fs/ext2/ioctl.c | 5 ++--
fs/ext2/namei.c | 6 ++--
fs/ext2/super.c | 2 +-
fs/ext2/xattr.c | 2 +-
fs/ext4/acl.c | 2 +-
fs/ext4/ext4.h | 6 ----
fs/ext4/extents.c | 10 +++----
fs/ext4/ialloc.c | 2 +-
fs/ext4/inline.c | 4 +--
fs/ext4/inode.c | 6 ++--
fs/ext4/ioctl.c | 8 ++---
fs/ext4/namei.c | 24 ++++++++-------
fs/ext4/super.c | 2 +-
fs/ext4/xattr.c | 2 +-
fs/f2fs/dir.c | 8 ++---
fs/f2fs/file.c | 8 ++---
fs/f2fs/inline.c | 2 +-
fs/f2fs/namei.c | 12 ++++----
fs/f2fs/segment.c | 2 +-
fs/f2fs/segment.h | 5 ++--
fs/f2fs/xattr.c | 2 +-
fs/fat/dir.c | 2 +-
fs/fat/file.c | 4 +--
fs/fat/inode.c | 2 +-
fs/fat/namei_msdos.c | 13 ++++----
fs/fat/namei_vfat.c | 10 +++----
fs/fuse/control.c | 2 +-
fs/gfs2/bmap.c | 8 ++---
fs/gfs2/dir.c | 12 ++++----
fs/gfs2/inode.c | 8 ++---
fs/gfs2/quota.c | 2 +-
fs/gfs2/xattr.c | 8 ++---
fs/hfs/catalog.c | 8 ++---
fs/hfs/dir.c | 2 +-
fs/hfs/inode.c | 2 +-
fs/hfsplus/catalog.c | 8 ++---
fs/hfsplus/dir.c | 6 ++--
fs/hfsplus/inode.c | 2 +-
fs/hfsplus/ioctl.c | 2 +-
fs/hugetlbfs/inode.c | 10 +++----
fs/jffs2/acl.c | 2 +-
fs/jffs2/fs.c | 2 +-
fs/jfs/acl.c | 2 +-
fs/jfs/inode.c | 5 ++--
fs/jfs/ioctl.c | 4 +--
fs/jfs/jfs_inode.c | 2 +-
fs/jfs/namei.c | 35 ++++++++++++----------
fs/jfs/super.c | 2 +-
fs/jfs/xattr.c | 2 +-
fs/libfs.c | 14 ++++-----
fs/logfs/dir.c | 6 ++--
fs/logfs/file.c | 2 +-
fs/logfs/inode.c | 3 +-
fs/logfs/readwrite.c | 4 +--
fs/minix/bitmap.c | 2 +-
fs/minix/dir.c | 12 ++++----
fs/minix/itree_common.c | 4 +--
fs/minix/namei.c | 4 +--
fs/nfs/client.c | 2 +-
fs/nfs/netns.h | 2 +-
fs/nilfs2/dir.c | 6 ++--
fs/nilfs2/inode.c | 4 +--
fs/nilfs2/ioctl.c | 2 +-
fs/nilfs2/namei.c | 6 ++--
fs/nsfs.c | 5 ++--
fs/ocfs2/acl.c | 2 +-
fs/ocfs2/alloc.c | 2 +-
fs/ocfs2/aops.c | 2 +-
fs/ocfs2/cluster/heartbeat.c | 2 +-
fs/ocfs2/dir.c | 4 +--
fs/ocfs2/dlmfs/dlmfs.c | 4 +--
fs/ocfs2/file.c | 12 ++++----
fs/ocfs2/inode.c | 2 +-
fs/ocfs2/journal.c | 4 +--
fs/ocfs2/move_extents.c | 2 +-
fs/ocfs2/namei.c | 17 ++++++-----
fs/ocfs2/ocfs2.h | 2 +-
fs/ocfs2/refcounttree.c | 4 +--
fs/ocfs2/super.c | 2 +-
fs/ocfs2/xattr.c | 2 +-
fs/omfs/dir.c | 4 +--
fs/omfs/inode.c | 2 +-
fs/openpromfs/inode.c | 2 +-
fs/orangefs/file.c | 2 +-
fs/orangefs/inode.c | 2 +-
fs/orangefs/namei.c | 6 ++--
fs/pipe.c | 5 ++--
fs/posix_acl.c | 2 +-
fs/proc/base.c | 2 +-
fs/proc/inode.c | 4 +--
fs/proc/proc_sysctl.c | 2 +-
fs/proc/self.c | 2 +-
fs/proc/thread_self.c | 2 +-
fs/pstore/inode.c | 2 +-
fs/ramfs/inode.c | 12 ++++----
fs/reiserfs/inode.c | 2 +-
fs/reiserfs/ioctl.c | 4 +--
fs/reiserfs/namei.c | 14 ++++-----
fs/reiserfs/stree.c | 6 ++--
fs/reiserfs/super.c | 2 +-
fs/reiserfs/xattr.c | 2 +-
fs/reiserfs/xattr_acl.c | 2 +-
fs/sysv/dir.c | 6 ++--
fs/sysv/ialloc.c | 2 +-
fs/sysv/itree.c | 4 +--
fs/sysv/namei.c | 4 +--
fs/tracefs/inode.c | 2 +-
fs/ubifs/dir.c | 10 +++----
fs/ubifs/file.c | 12 ++++----
fs/ubifs/ioctl.c | 2 +-
fs/ubifs/misc.h | 10 -------
fs/ubifs/sb.c | 18 ++++++++---
fs/ubifs/xattr.c | 6 ++--
fs/udf/super.c | 4 +--
fs/ufs/dir.c | 6 ++--
fs/ufs/ialloc.c | 8 +++--
fs/ufs/inode.c | 6 ++--
fs/ufs/namei.c | 6 ++--
include/linux/audit.h | 4 +--
include/linux/time.h | 18 ++++++++---
ipc/mqueue.c | 21 ++++++-------
kernel/audit.c | 10 +++----
kernel/audit.h | 2 +-
kernel/auditsc.c | 6 ++--
kernel/bpf/inode.c | 2 +-
kernel/time/timeconv.c | 11 +++----
mm/shmem.c | 26 ++++++++--------
net/ceph/messenger.c | 6 ++--
net/ceph/osd_client.c | 4 +--
net/sunrpc/rpc_pipe.c | 2 +-
security/inode.c | 2 +-
security/selinux/selinuxfs.c | 2 +-
173 files changed, 494 insertions(+), 458 deletions(-)
--
1.9.1
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Benny Halevy <bhalevy@primarydata.com>
Cc: Boaz Harrosh <ooo@electrozaur.com>
Cc: Changman Lee <cm224.lee@samsung.com>
Cc: Chris Mason <clm@fb.com>
Cc: Colin Cross <ccross@android.com>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Sterba <dsterba@suse.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Joern Engel <joern@logfs.org>
Cc: Josef Bacik <jbacik@fb.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
Cc: Robert Richter <rric@kernel.org>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: autofs@vger.kernel.org
Cc: cluster-devel@redhat.com
Cc: jfs-discussion@lists.sourceforge.net
Cc: linux-btrfs@vger.kernel.org
Cc: linux-efi@vger.kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: linux-nfs@vger.kernel.org
Cc: linux-nilfs@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-rdma@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: logfs@logfs.org
Cc: netdev@vger.kernel.org
Cc: ocfs2-devel@oss.oracle.com
Cc: oprofile-list@lists.sf.net
Cc: osd-dev@open-osd.org
Cc: selinux@tycho.nsa.gov
Cc: v9fs-developer@lists.sourceforge.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
2016-06-09 5:04 [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Deepa Dinamani
@ 2016-06-09 5:05 ` Deepa Dinamani
2016-06-09 19:23 ` Trond Myklebust
2016-06-09 7:51 ` [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Felipe Balbi
1 sibling, 1 reply; 7+ messages in thread
From: Deepa Dinamani @ 2016-06-09 5:05 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds, y2038,
Trond Myklebust, Anna Schumaker, linux-nfs
boot_time is represented as a struct timespec.
struct timespec and CURRENT_TIME are not y2038 safe.
Overall, the plan is to use timespec64 for all internal
kernel representation of timestamps.
CURRENT_TIME will also be removed.
Use struct timespec64 to represent boot_time.
And, ktime_get_real_ts64() for the boot_time value.
boot_time is used to construct the nfs client boot verifier.
This will now wrap in 2106 instead of 2038 on 32-bit systems.
The server only relies on the value being persistent until
reboot so the wrapping should be fine.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org
---
fs/nfs/client.c | 2 +-
fs/nfs/netns.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 0c96528..406972e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1080,7 +1080,7 @@ void nfs_clients_init(struct net *net)
idr_init(&nn->cb_ident_idr);
#endif
spin_lock_init(&nn->nfs_client_lock);
- nn->boot_time = CURRENT_TIME;
+ ktime_get_real_ts64(&nn->boot_time);
}
#ifdef CONFIG_PROC_FS
diff --git a/fs/nfs/netns.h b/fs/nfs/netns.h
index f0e06e4..48d6b95 100644
--- a/fs/nfs/netns.h
+++ b/fs/nfs/netns.h
@@ -29,7 +29,7 @@ struct nfs_net {
int cb_users[NFS4_MAX_MINOR_VERSION + 1];
#endif
spinlock_t nfs_client_lock;
- struct timespec boot_time;
+ struct timespec64 boot_time;
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_nfsfs;
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros
2016-06-09 5:04 [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Deepa Dinamani
2016-06-09 5:05 ` [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani
@ 2016-06-09 7:51 ` Felipe Balbi
1 sibling, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2016-06-09 7:51 UTC (permalink / raw)
To: Deepa Dinamani, linux-fsdevel, linux-kernel
Cc: Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds, y2038,
Anna Schumaker, Anton Vorontsov, Benny Halevy, Boaz Harrosh,
Changman Lee, Chris Mason, Colin Cross, Dave Kleikamp,
David S. Miller, David Sterba, Eric Van Hensbergen, Hugh Dickins,
Ian Kent, Jaegeuk Kim, Joern Engel, Josef Bacik, Kees Cook,
Latchesar Ionkov, Matt Fleming, Matthew Garrett, Miklos Szeredi,
Nadia Yvette Chambers, Prasad Joshi, Robert Richter, Ron Minnich,
Tony Luck, Trond Myklebust, autofs, cluster-devel, jfs-discussion,
linux-btrfs, linux-efi, linux-f2fs-devel, linux-mm, linux-nfs,
linux-nilfs, linuxppc-dev, linux-rdma, linux-s390,
linux-security-module, linux-usb, logfs, netdev, ocfs2-devel,
oprofile-list, osd-dev, selinux, v9fs-developer
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
Hi,
Deepa Dinamani <deepa.kernel@gmail.com> writes:
> drivers/usb/gadget/function/f_fs.c | 2 +-
> drivers/usb/gadget/legacy/inode.c | 2 +-
for drivers/usb/gadget:
Acked-by: Felipe Balbi <balbi@kernel.org>
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
2016-06-09 5:05 ` [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani
@ 2016-06-09 19:23 ` Trond Myklebust
2016-06-09 21:10 ` Deepa Dinamani
0 siblings, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2016-06-09 19:23 UTC (permalink / raw)
To: Deepa Dinamani, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds,
y2038@lists.linaro.org, Anna Schumaker, linux-nfs@vger.kernel.org
DQoNCk9uIDYvOS8xNiwgMDE6MDUsICJEZWVwYSBEaW5hbWFuaSIgPGRlZXBhLmtlcm5lbEBnbWFp
bC5jb20+IHdyb3RlOg0KDQo+Ym9vdF90aW1lIGlzIHJlcHJlc2VudGVkIGFzIGEgc3RydWN0IHRp
bWVzcGVjLg0KPnN0cnVjdCB0aW1lc3BlYyBhbmQgQ1VSUkVOVF9USU1FIGFyZSBub3QgeTIwMzgg
c2FmZS4NCj5PdmVyYWxsLCB0aGUgcGxhbiBpcyB0byB1c2UgdGltZXNwZWM2NCBmb3IgYWxsIGlu
dGVybmFsDQo+a2VybmVsIHJlcHJlc2VudGF0aW9uIG9mIHRpbWVzdGFtcHMuDQo+Q1VSUkVOVF9U
SU1FIHdpbGwgYWxzbyBiZSByZW1vdmVkLg0KPlVzZSBzdHJ1Y3QgdGltZXNwZWM2NCB0byByZXBy
ZXNlbnQgYm9vdF90aW1lLg0KPkFuZCwga3RpbWVfZ2V0X3JlYWxfdHM2NCgpIGZvciB0aGUgYm9v
dF90aW1lIHZhbHVlLg0KPg0KPmJvb3RfdGltZSBpcyB1c2VkIHRvIGNvbnN0cnVjdCB0aGUgbmZz
IGNsaWVudCBib290IHZlcmlmaWVyLg0KPlRoaXMgd2lsbCBub3cgd3JhcCBpbiAyMTA2IGluc3Rl
YWQgb2YgMjAzOCBvbiAzMi1iaXQgc3lzdGVtcy4NCj5UaGUgc2VydmVyIG9ubHkgcmVsaWVzIG9u
IHRoZSB2YWx1ZSBiZWluZyBwZXJzaXN0ZW50IHVudGlsDQo+cmVib290IHNvIHRoZSB3cmFwcGlu
ZyBzaG91bGQgYmUgZmluZS4NCg0KV2UgcmVhbGx5IGRvIG5vdCBnaXZlIGEgZGFtbiBhYm91dCB3
cmFwYXJvdW5kIGhlcmUsIHNpbmNlIHRoZSBib290IHRpbWUgaXMgb25seSBldmVyIGNvbXBhcmVk
IGZvciBhbiBleGFjdCBtYXRjaCwgYW5kIHRoZSBvZGRzIG9mIHR3byByZWJvb3RzIG9jY3Vycmlu
ZyBleGFjdGx5IDJeMzIgKiAxMF45IG5hbm9zZWNvbmRzIGFwYXJ0IGFyZSBjb3NtaWNhbGx5IHNt
YWxsLi4uDQoNCklmIHN0cnVjdCB0aW1lc3BlYyBpcyBnb2luZyBhd2F5LCBjYW4gd2UganVzdCBj
b252ZXJ0IHRoaXMgaW50byBhIGt0aW1lX3Q/DQoNClRyb25kDQoNCg==
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
2016-06-09 19:23 ` Trond Myklebust
@ 2016-06-09 21:10 ` Deepa Dinamani
2016-06-10 13:12 ` Anna Schumaker
0 siblings, 1 reply; 7+ messages in thread
From: Deepa Dinamani @ 2016-06-09 21:10 UTC (permalink / raw)
To: Trond Myklebust
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds,
y2038@lists.linaro.org, Anna Schumaker, linux-nfs@vger.kernel.org
>>boot_time is represented as a struct timespec.
>>struct timespec and CURRENT_TIME are not y2038 safe.
>>Overall, the plan is to use timespec64 for all internal
>>kernel representation of timestamps.
>>CURRENT_TIME will also be removed.
>>Use struct timespec64 to represent boot_time.
>>And, ktime_get_real_ts64() for the boot_time value.
>>
>>boot_time is used to construct the nfs client boot verifier.
>>This will now wrap in 2106 instead of 2038 on 32-bit systems.
>>The server only relies on the value being persistent until
>>reboot so the wrapping should be fine.
>
> We really do not give a damn about wraparound here, since the boot time is
> only ever compared for an exact match, and the odds of two reboots occurring
> exactly 2^32 * 10^9 nanoseconds apart are cosmically small...
> If struct timespec is going away, can we just convert this into a ktime_t?
timespec64 is the same as timespec already on 64 bit machines.
But, yes, we can use ktime_t here.
Did you mean the internal storage value or the wire boo_time used for verifier?
In case you don't want to change the wire value, then we will have a division
operation, every time the verifier needs to be sent.
-Deepa
-Deepa
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
2016-06-09 21:10 ` Deepa Dinamani
@ 2016-06-10 13:12 ` Anna Schumaker
2016-06-10 14:02 ` Trond Myklebust
0 siblings, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2016-06-10 13:12 UTC (permalink / raw)
To: Deepa Dinamani, Trond Myklebust
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Arnd Bergmann, Thomas Gleixner, Al Viro, Linus Torvalds,
y2038@lists.linaro.org, linux-nfs@vger.kernel.org
On 06/09/2016 05:10 PM, Deepa Dinamani wrote:
>>> boot_time is represented as a struct timespec.
>>> struct timespec and CURRENT_TIME are not y2038 safe.
>>> Overall, the plan is to use timespec64 for all internal
>>> kernel representation of timestamps.
>>> CURRENT_TIME will also be removed.
>>> Use struct timespec64 to represent boot_time.
>>> And, ktime_get_real_ts64() for the boot_time value.
>>>
>>> boot_time is used to construct the nfs client boot verifier.
>>> This will now wrap in 2106 instead of 2038 on 32-bit systems.
>>> The server only relies on the value being persistent until
>>> reboot so the wrapping should be fine.
>>
>> We really do not give a damn about wraparound here, since the boot time is
>> only ever compared for an exact match, and the odds of two reboots occurring
>> exactly 2^32 * 10^9 nanoseconds apart are cosmically small...
>> If struct timespec is going away, can we just convert this into a ktime_t?
>
> timespec64 is the same as timespec already on 64 bit machines.
> But, yes, we can use ktime_t here.
>
> Did you mean the internal storage value or the wire boo_time used for verifier?
> In case you don't want to change the wire value, then we will have a division
> operation, every time the verifier needs to be sent.
The verifier is mostly used during mounting, so we don't send too many of them. I don't think we need to worry about adding an extra division operation here, they're pretty cheap compared to making RPC calls! :)
Anna
>
> -Deepa
>
> -Deepa
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe
2016-06-10 13:12 ` Anna Schumaker
@ 2016-06-10 14:02 ` Trond Myklebust
0 siblings, 0 replies; 7+ messages in thread
From: Trond Myklebust @ 2016-06-10 14:02 UTC (permalink / raw)
To: Anna Schumaker, 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, linux-nfs@vger.kernel.org
DQoNCk9uIDYvMTAvMTYsIDA5OjEyLCAiQW5uYSBTY2h1bWFrZXIiIDxBbm5hLlNjaHVtYWtlckBu
ZXRhcHAuY29tPiB3cm90ZToNCg0KPk9uIDA2LzA5LzIwMTYgMDU6MTAgUE0sIERlZXBhIERpbmFt
YW5pIHdyb3RlOg0KPj4+PiBib290X3Rpb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YW5naW5nIHRoZSBmb3JtYXQgaXMgbm90
IGEgcHJvYmxlbSBlaXRoZXIuIA0KDQpDaGVlcnMNCiAgVHJvbmQNCg0K
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-10 14:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 5:04 [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Deepa Dinamani
2016-06-09 5:05 ` [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani
2016-06-09 19:23 ` Trond Myklebust
2016-06-09 21:10 ` Deepa Dinamani
2016-06-10 13:12 ` Anna Schumaker
2016-06-10 14:02 ` Trond Myklebust
2016-06-09 7:51 ` [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Felipe Balbi
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).