All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps
@ 2016-04-08 15:47 Deepa Dinamani
  2016-04-08 15:47 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Deepa Dinamani @ 2016-04-08 15:47 UTC (permalink / raw)
  To: linux-fsdevel, y2038; +Cc: tglx, arnd, viro

Resending for inclusion in Thomas's tree.

The series contains infrastucture patches required to convert
vfs times to use 64 bit time.

The intention is to include these as part of 4.6 so that the follow on
patches can go into 4.7.

Patch 1 is as per the agreed upon RFC approach 2b:
https://lkml.org/lkml/2016/2/12/105
And, patch 2 is as per previously agreed upon discussion in:
https://lkml.org/lkml/2016/1/7/20

The patches that will use these will be posted for the subsequent
kernel release.

The series and the plan have been discussed with Arnd Bergmann and
Thomas Gleixner.

Deepa Dinamani (2):
  fs: Add current_fs_time_sec() function
  vfs: Add vfs_time accessors

 include/linux/fs.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--
1.9.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] fs: Add current_fs_time_sec() function
  2016-04-08 15:47 [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Deepa Dinamani
@ 2016-04-08 15:47 ` Deepa Dinamani
  2016-04-09  1:16   ` Arnd Bergmann
  2016-04-08 15:47 ` [PATCH 2/2] vfs: Add vfs_time accessors Deepa Dinamani
  2016-04-08 15:49 ` [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Thomas Gleixner
  2 siblings, 1 reply; 9+ messages in thread
From: Deepa Dinamani @ 2016-04-08 15:47 UTC (permalink / raw)
  To: linux-fsdevel, y2038; +Cc: tglx, arnd, viro

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>
---
 include/linux/fs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index e3c0b7e..fc09058 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1435,6 +1435,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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] vfs: Add vfs_time accessors
  2016-04-08 15:47 [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Deepa Dinamani
  2016-04-08 15:47 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani
@ 2016-04-08 15:47 ` Deepa Dinamani
  2016-04-09  1:17   ` Arnd Bergmann
  2016-04-08 15:49 ` [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Thomas Gleixner
  2 siblings, 1 reply; 9+ messages in thread
From: Deepa Dinamani @ 2016-04-08 15:47 UTC (permalink / raw)
  To: linux-fsdevel, y2038; +Cc: tglx, arnd, viro

Add vfs_time accessors to help convert vfs timestamps to use
64 bit times. These create an abstraction layer so that
vfs inode times can be switched to use struct timespec64 from
struct timespec without breaking the individual filesystems
after they have incorporated these.

Use uapi exposed data types, timespec and timespec64 here to keep
minimal timestamp data type conversions in API's interfacing with
vfs.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
---
 include/linux/fs.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index fc09058..d0bf64f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1440,6 +1440,21 @@ static inline struct timespec current_fs_time_sec(struct super_block *sb)
 	return (struct timespec) { get_seconds(), 0 };
 }
 
+/* Place holder defines to ensure safe transition to timespec64
+ * in the vfs layer.
+ * These can be deleted after all filesystems and vfs are switched
+ * over to using 64 bit time.
+ */
+static inline struct timespec vfs_time_to_timespec(struct timespec inode_ts)
+{
+	return inode_ts;
+}
+
+static inline struct timespec timespec_to_vfs_time(struct timespec ts)
+{
+	return ts;
+}
+
 /*
  * Snapshotting support.
  */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps
  2016-04-08 15:47 [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Deepa Dinamani
  2016-04-08 15:47 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani
  2016-04-08 15:47 ` [PATCH 2/2] vfs: Add vfs_time accessors Deepa Dinamani
@ 2016-04-08 15:49 ` Thomas Gleixner
  2016-04-17 22:39   ` [Y2038] " Arnd Bergmann
  2016-04-26 16:15   ` Arnd Bergmann
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Gleixner @ 2016-04-08 15:49 UTC (permalink / raw)
  To: Deepa Dinamani; +Cc: linux-fsdevel, y2038, arnd, viro

On Fri, 8 Apr 2016, Deepa Dinamani wrote:

> Resending for inclusion in Thomas's tree.
> 
> The series contains infrastucture patches required to convert
> vfs times to use 64 bit time.
> 
> The intention is to include these as part of 4.6 so that the follow on
> patches can go into 4.7.
> 
> Patch 1 is as per the agreed upon RFC approach 2b:
> https://lkml.org/lkml/2016/2/12/105
> And, patch 2 is as per previously agreed upon discussion in:
> https://lkml.org/lkml/2016/1/7/20
> 
> The patches that will use these will be posted for the subsequent
> kernel release.

Al: Are you ok with those? Can you ship them to Linus or shall I route them?

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] fs: Add current_fs_time_sec() function
  2016-04-08 15:47 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani
@ 2016-04-09  1:16   ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-04-09  1:16 UTC (permalink / raw)
  To: Deepa Dinamani; +Cc: linux-fsdevel, y2038, tglx, viro

On Friday 08 April 2016, Deepa Dinamani wrote:
> 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>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] vfs: Add vfs_time accessors
  2016-04-08 15:47 ` [PATCH 2/2] vfs: Add vfs_time accessors Deepa Dinamani
@ 2016-04-09  1:17   ` Arnd Bergmann
  0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-04-09  1:17 UTC (permalink / raw)
  To: Deepa Dinamani; +Cc: linux-fsdevel, y2038, tglx, viro

On Friday 08 April 2016, Deepa Dinamani wrote:
> Add vfs_time accessors to help convert vfs timestamps to use
> 64 bit times. These create an abstraction layer so that
> vfs inode times can be switched to use struct timespec64 from
> struct timespec without breaking the individual filesystems
> after they have incorporated these.
> 
> Use uapi exposed data types, timespec and timespec64 here to keep
> minimal timestamp data type conversions in API's interfacing with
> vfs.
> 
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Y2038] [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps
  2016-04-08 15:49 ` [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Thomas Gleixner
@ 2016-04-17 22:39   ` Arnd Bergmann
  2016-04-26 16:15   ` Arnd Bergmann
  1 sibling, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-04-17 22:39 UTC (permalink / raw)
  To: y2038; +Cc: Thomas Gleixner, Deepa Dinamani, linux-fsdevel, viro

On Friday 08 April 2016 08:49:14 Thomas Gleixner wrote:
> On Fri, 8 Apr 2016, Deepa Dinamani wrote:
> 
> > Resending for inclusion in Thomas's tree.
> > 
> > The series contains infrastucture patches required to convert
> > vfs times to use 64 bit time.
> > 
> > The intention is to include these as part of 4.6 so that the follow on
> > patches can go into 4.7.
> > 
> > Patch 1 is as per the agreed upon RFC approach 2b:
> > https://lkml.org/lkml/2016/2/12/105
> > And, patch 2 is as per previously agreed upon discussion in:
> > https://lkml.org/lkml/2016/1/7/20
> > 
> > The patches that will use these will be posted for the subsequent
> > kernel release.
> 
> Al: Are you ok with those? Can you ship them to Linus or shall I route them?

It seems these fell through the cracks, any chance we can still get them
into 4.6?

	Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps
  2016-04-08 15:49 ` [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Thomas Gleixner
  2016-04-17 22:39   ` [Y2038] " Arnd Bergmann
@ 2016-04-26 16:15   ` Arnd Bergmann
  1 sibling, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-04-26 16:15 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Deepa Dinamani, linux-fsdevel, y2038, viro

On Friday 08 April 2016 08:49:14 Thomas Gleixner wrote:
> On Fri, 8 Apr 2016, Deepa Dinamani wrote:
> 
> > Resending for inclusion in Thomas's tree.
> > 
> > The series contains infrastucture patches required to convert
> > vfs times to use 64 bit time.
> > 
> > The intention is to include these as part of 4.6 so that the follow on
> > patches can go into 4.7.
> > 
> > Patch 1 is as per the agreed upon RFC approach 2b:
> > https://lkml.org/lkml/2016/2/12/105
> > And, patch 2 is as per previously agreed upon discussion in:
> > https://lkml.org/lkml/2016/1/7/20
> > 
> > The patches that will use these will be posted for the subsequent
> > kernel release.
> 
> Al: Are you ok with those? Can you ship them to Linus or shall I route them?

I guess it's too late for v4.6 now, but I've put all three patches into
my y2038 tree so they get some exposure in linux-next and so we can start
queuing some of the patches depending on them on top for v4.7.

I can send these on as pull requests to either of you, Thomas or Al,
or I'll send them to Linus directly in the merge window if you don't
want to deal with them.

	Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] fs: Add current_fs_time_sec() function
  2016-03-02 15:31 [PATCH 0/2] Add infrastructure to support vfs 64 bit times Deepa Dinamani
@ 2016-03-02 15:31 ` Deepa Dinamani
  0 siblings, 0 replies; 9+ messages in thread
From: Deepa Dinamani @ 2016-03-02 15:31 UTC (permalink / raw)
  To: linux-fsdevel, y2038; +Cc: viro, tglx, arnd

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>
---
 include/linux/fs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1af4727..e0b29d4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1404,6 +1404,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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-26 16:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 15:47 [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Deepa Dinamani
2016-04-08 15:47 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani
2016-04-09  1:16   ` Arnd Bergmann
2016-04-08 15:47 ` [PATCH 2/2] vfs: Add vfs_time accessors Deepa Dinamani
2016-04-09  1:17   ` Arnd Bergmann
2016-04-08 15:49 ` [PATCH 0/2] Add infrastructure to support vfs 64 bit timestamps Thomas Gleixner
2016-04-17 22:39   ` [Y2038] " Arnd Bergmann
2016-04-26 16:15   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2016-03-02 15:31 [PATCH 0/2] Add infrastructure to support vfs 64 bit times Deepa Dinamani
2016-03-02 15:31 ` [PATCH 1/2] fs: Add current_fs_time_sec() function Deepa Dinamani

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.