Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324951
| From | Deepa Dinamani <deepa.kernel@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/10] fs: Add current_fs_time_sec() function |
| Date | 2016-02-03 07:20 +0100 |
| Message-ID | <qXYXh-6CP-25@gated-at.bofh.it> (permalink) |
| References | <qXYXg-6CP-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is in preparation for the series that transitions
filesystem timestamps to use 64 bit time and hence make
them y2038 safe.
The function is meant to replace CURRENT_TIME_SEC macro.
The macro CURRENT_TIME_SEC does not represent filesystem times
correctly as it cannot perform range checks.
current_fs_time_sec() will be extended to include these.
CURRENT_TIME_SEC is also not y2038 safe. current_fs_time_sec()
will be transitioned to use 64 bit time along with vfs in a
separate series.
The function is inline for now to maintain similar performance
to that of the macro.
The function takes super block as a parameter to allow for
future range checking of filesystem timestamps.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
---
include/linux/fs.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6a75571..4af612f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1407,6 +1407,11 @@ struct super_block {
extern struct timespec current_fs_time(struct super_block *sb);
+static inline struct timespec current_fs_time_sec(struct super_block *sb)
+{
+ return (struct timespec) { get_seconds(), 0 };
+}
+
/*
* Snapshotting support.
*/
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
[PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
[PATCH 01/10] fs: Add current_fs_time_sec() function Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
[PATCH 02/10] vfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
[PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() "Yan, Zheng" <ukernel@gmail.com> - 2016-02-03 15:40 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 17:20 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-03 22:30 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() "Yan, Zheng" <zyan@redhat.com> - 2016-02-04 03:10 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 09:40 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Ilya Dryomov <idryomov@gmail.com> - 2016-02-04 10:10 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 14:40 +0100
Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Gregory Farnum <gfarnum@redhat.com> - 2016-02-04 16:30 +0100
Re: [Y2038] [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Arnd Bergmann <arnd@arndb.de> - 2016-02-04 22:10 +0100
[PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
Re: [PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() "Yan, Zheng" <zyan@redhat.com> - 2016-02-03 07:30 +0100
[PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-03 07:20 +0100
Re: [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() David Sterba <dsterba@suse.cz> - 2016-02-04 15:20 +0100
Re: [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-05 12:40 +0100
[PATCH v2 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-07 09:00 +0100
Re: [PATCH v2 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() David Sterba <dsterba@suse.cz> - 2016-02-08 16:10 +0100
Re: [Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Arnd Bergmann <arnd@arndb.de> - 2016-02-03 22:40 +0100
Re: [Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-04 06:00 +0100
csiph-web