All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, tglx@linutronix.de, torvalds@linux-foundation.org,
	gregkh@linuxfoundation.org, akpm@linux-foundation.org,
	tytso@mit.edu, viro@zeniv.linux.org.uk, y2038@lists.linaro.org,
	balbi@kernel.org, swhiteho@redhat.com,
	konishi.ryusuke@lab.ntt.co.jp, dsterba@suse.com, jack@suse.cz
Subject: [PATCH v5 0/5] Introduce current_time() api
Date: Wed, 14 Sep 2016 07:48:01 -0700	[thread overview]
Message-ID: <1473864486-30862-1-git-send-email-deepa.kernel@gmail.com> (raw)

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.

Thanks to Arnd Bergmann for all the guidance and discussions.

Patches 2-4 were mostly generated using coccinelle scripts.

All filesystem timestamps use current_fs_time() for right granularity as
mentioned in the respective commit texts of patches. This has a changed
signature, renamed to current_time() and moved to the fs/inode.c.

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_time() now is used as a single generic vfs filesystem timestamp api.
It also takes struct inode* as argument instead of struct super_block*.
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.

Changes from v4:
* Keeping only api introduction and the generic coccinelle patches in the series.
* Individual patches will be sent to respective maintainers as suggested by greg:
  https://lkml.org/lkml/2016/8/15/470

Changes from v3:
* Rebased to 4.8-rc1 to avoid merge conflicts.
* Added CURRENT_TIME deletion and fnic patches back as time64_to_tm() is merged.
* Rearranged a couple of instances of CURRENT_TIME.

Changes from v2:
* Fix buildbot error for uninitialized sb in inode.
* Minor fixes according to Arnd's comments.
* Leave out the fnic and deletion of CURRENT_TIME to be submitted after 4.8 rc1.

Changes from v1:
* Change current_fs_time(struct super_block *) to current_time(struct inode *)
* Note that change to add time64_to_tm() is already part of John's
  kernel tree: https://lkml.org/lkml/2016/6/17/875 .

Deepa Dinamani (5):
  vfs: Add current_time() api
  fs: proc: Delete inode time initializations in proc_alloc_inode()
  fs: Replace CURRENT_TIME with current_time() for inode timestamps
  fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps
  fs: Replace current_fs_time() with current_time()

 arch/powerpc/platforms/cell/spufs/inode.c |  2 +-
 arch/s390/hypfs/inode.c                   |  4 ++--
 drivers/char/sonypi.c                     |  2 +-
 drivers/infiniband/hw/qib/qib_fs.c        |  2 +-
 drivers/misc/ibmasm/ibmasmfs.c            |  2 +-
 drivers/oprofile/oprofilefs.c             |  2 +-
 drivers/platform/x86/sony-laptop.c        |  2 +-
 drivers/usb/core/devio.c                  | 18 +++++++++---------
 drivers/usb/gadget/function/f_fs.c        |  8 ++++----
 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/attr.c                                 |  2 +-
 fs/autofs4/inode.c                        |  2 +-
 fs/autofs4/root.c                         |  6 +++---
 fs/bad_inode.c                            |  2 +-
 fs/bfs/dir.c                              | 14 +++++++-------
 fs/binfmt_misc.c                          |  2 +-
 fs/btrfs/file.c                           |  6 +++---
 fs/btrfs/inode.c                          | 22 +++++++++++-----------
 fs/btrfs/ioctl.c                          |  8 ++++----
 fs/btrfs/transaction.c                    |  4 ++--
 fs/btrfs/xattr.c                          |  2 +-
 fs/ceph/file.c                            |  4 ++--
 fs/ceph/inode.c                           |  2 +-
 fs/ceph/xattr.c                           |  2 +-
 fs/cifs/file.c                            |  4 ++--
 fs/coda/dir.c                             |  2 +-
 fs/coda/file.c                            |  2 +-
 fs/coda/inode.c                           |  2 +-
 fs/configfs/inode.c                       |  6 +++---
 fs/debugfs/inode.c                        |  2 +-
 fs/devpts/inode.c                         |  6 +++---
 fs/efivarfs/inode.c                       |  2 +-
 fs/exofs/dir.c                            |  6 +++---
 fs/exofs/inode.c                          |  4 ++--
 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                           |  4 ++--
 fs/ext2/namei.c                           |  6 +++---
 fs/ext2/super.c                           |  2 +-
 fs/ext2/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/xattr.c                           |  2 +-
 fs/fat/dir.c                              |  2 +-
 fs/fat/file.c                             |  6 +++---
 fs/fat/inode.c                            |  2 +-
 fs/fat/namei_msdos.c                      | 12 ++++++------
 fs/fat/namei_vfat.c                       | 10 +++++-----
 fs/fuse/control.c                         |  2 +-
 fs/fuse/dir.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/inode.c                                | 29 ++++++++++++++++++++++++++---
 fs/jffs2/acl.c                            |  2 +-
 fs/jffs2/fs.c                             |  2 +-
 fs/jfs/acl.c                              |  2 +-
 fs/jfs/inode.c                            |  2 +-
 fs/jfs/jfs_inode.c                        |  2 +-
 fs/jfs/namei.c                            | 24 ++++++++++++------------
 fs/jfs/super.c                            |  2 +-
 fs/jfs/xattr.c                            |  2 +-
 fs/kernfs/inode.c                         |  2 +-
 fs/libfs.c                                | 14 +++++++-------
 fs/locks.c                                |  2 +-
 fs/logfs/dir.c                            |  6 +++---
 fs/logfs/file.c                           |  2 +-
 fs/logfs/inode.c                          |  4 ++--
 fs/logfs/readwrite.c                      |  4 ++--
 fs/minix/bitmap.c                         |  2 +-
 fs/minix/dir.c                            |  6 +++---
 fs/minix/itree_common.c                   |  4 ++--
 fs/minix/namei.c                          |  4 ++--
 fs/nfsd/blocklayout.c                     |  2 +-
 fs/nilfs2/dir.c                           |  6 +++---
 fs/nilfs2/inode.c                         |  4 ++--
 fs/nilfs2/ioctl.c                         |  2 +-
 fs/nilfs2/namei.c                         |  6 +++---
 fs/nsfs.c                                 |  2 +-
 fs/ntfs/inode.c                           |  2 +-
 fs/ntfs/mft.c                             |  2 +-
 fs/ocfs2/acl.c                            |  2 +-
 fs/ocfs2/alloc.c                          |  2 +-
 fs/ocfs2/aops.c                           |  2 +-
 fs/ocfs2/dir.c                            |  4 ++--
 fs/ocfs2/dlmfs/dlmfs.c                    |  4 ++--
 fs/ocfs2/file.c                           | 12 ++++++------
 fs/ocfs2/move_extents.c                   |  2 +-
 fs/ocfs2/namei.c                          | 10 +++++-----
 fs/ocfs2/refcounttree.c                   |  4 ++--
 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                       | 10 +++++-----
 fs/pipe.c                                 |  2 +-
 fs/posix_acl.c                            |  2 +-
 fs/proc/base.c                            |  2 +-
 fs/proc/inode.c                           |  3 +--
 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                          |  6 +++---
 fs/reiserfs/inode.c                       |  2 +-
 fs/reiserfs/ioctl.c                       |  4 ++--
 fs/reiserfs/namei.c                       | 12 ++++++------
 fs/reiserfs/stree.c                       |  8 ++++----
 fs/reiserfs/super.c                       |  2 +-
 fs/reiserfs/xattr.c                       |  6 +++---
 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/udf/ialloc.c                           |  2 +-
 fs/udf/inode.c                            |  4 ++--
 fs/udf/namei.c                            | 20 ++++++++++----------
 fs/ufs/dir.c                              |  6 +++---
 fs/ufs/ialloc.c                           |  2 +-
 fs/ufs/inode.c                            |  6 +++---
 fs/ufs/namei.c                            |  6 +++---
 fs/xfs/xfs_acl.c                          |  2 +-
 fs/xfs/xfs_inode.c                        |  2 +-
 fs/xfs/xfs_iops.c                         |  2 +-
 fs/xfs/xfs_trans_inode.c                  |  2 +-
 include/linux/fs.h                        |  1 +
 ipc/mqueue.c                              | 18 +++++++++---------
 kernel/bpf/inode.c                        |  2 +-
 mm/shmem.c                                | 20 ++++++++++----------
 net/sunrpc/rpc_pipe.c                     |  2 +-
 security/apparmor/apparmorfs.c            |  2 +-
 security/inode.c                          |  2 +-
 security/selinux/selinuxfs.c              |  2 +-
 156 files changed, 381 insertions(+), 358 deletions(-)

-- 
2.7.4

Cc: balbi@kernel.org
Cc: swhiteho@redhat.com
Cc: konishi.ryusuke@lab.ntt.co.jp
Cc: dsterba@suse.com
Cc: jack@suse.cz

             reply	other threads:[~2016-09-14 14:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 14:48 Deepa Dinamani [this message]
2016-09-14 14:48 ` [PATCH v5 1/5] vfs: Add current_time() api Deepa Dinamani
2016-09-14 18:52   ` Thomas Gleixner
2016-09-14 20:29     ` Deepa Dinamani
2016-09-14 20:33       ` Thomas Gleixner
2016-09-14 14:48 ` [PATCH v5 2/5] fs: proc: Delete inode time initializations in proc_alloc_inode() Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 3/5] fs: Replace CURRENT_TIME with current_time() for inode timestamps Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 4/5] fs: Replace CURRENT_TIME_SEC " Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 5/5] fs: Replace current_fs_time() with current_time() Deepa Dinamani
2016-09-14 16:45 ` [PATCH v5 0/5] Introduce current_time() api Linus Torvalds
2016-09-27 22:46   ` Al Viro

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=1473864486-30862-1-git-send-email-deepa.kernel@gmail.com \
    --to=deepa.kernel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=balbi@kernel.org \
    --cc=dsterba@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.