All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] vfs: Add support to document max and min inode times
@ 2016-04-08 15:55 Deepa Dinamani
  2016-04-09  1:18 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Deepa Dinamani @ 2016-04-08 15:55 UTC (permalink / raw)
  To: linux-fsdevel, y2038; +Cc: tglx, arnd, viro

This is a preparation patch to add range checking for inode
timestamps.

Extend struct super_block to include information about the max
and min inode times each filesystem can hold. These are dependent
on the on-disk format of filesystems.

These range checks will be used to clamp timestamps to filesystem
allowed ranges.

Individual filesystems do not have the same on disk format as
the in memory inodes. Range checking and clamping times assigned
to inodes will help keep in memory and on-disk timestamps to be
in sync.

Another series will initialize these fields to appropriate values for
every filesystem.

The fields are not used by vfs yet.
The exact policy and behavior will be decided in a separate patch.

The original idea for the feature comes from the discussion:
https://lkml.org/lkml/2014/5/30/669

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
---

Resending for inclusion in Thomas's tree.

 include/linux/fs.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index d0bf64f..c936314 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1374,7 +1374,14 @@ struct super_block {
 
 	/* Granularity of c/m/atime in ns.
 	   Cannot be worse than a second */
-	u32		   s_time_gran;
+	u32		s_time_gran;
+
+	/*
+	 * Max and min values for timestamps
+	 * according to the range supported by filesystems.
+	 */
+	time64_t	s_time_min;
+	time64_t	s_time_max;
 
 	/*
 	 * The next field is for VFS *only*. No filesystems have any business
-- 
1.9.1


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

* Re: [PATCH RESEND] vfs: Add support to document max and min inode times
  2016-04-08 15:55 [PATCH RESEND] vfs: Add support to document max and min inode times Deepa Dinamani
@ 2016-04-09  1:18 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-04-09  1:18 UTC (permalink / raw)
  To: Deepa Dinamani; +Cc: linux-fsdevel, y2038, tglx, viro

On Friday 08 April 2016, Deepa Dinamani wrote:
> This is a preparation patch to add range checking for inode
> timestamps.
> 
> Extend struct super_block to include information about the max
> and min inode times each filesystem can hold. These are dependent
> on the on-disk format of filesystems.
> 
> These range checks will be used to clamp timestamps to filesystem
> allowed ranges.
> 
> Individual filesystems do not have the same on disk format as
> the in memory inodes. Range checking and clamping times assigned
> to inodes will help keep in memory and on-disk timestamps to be
> in sync.
> 
> Another series will initialize these fields to appropriate values for
> every filesystem.
> 
> The fields are not used by vfs yet.
> The exact policy and behavior will be decided in a separate patch.
> 
> The original idea for the feature comes from the discussion:
> https://lkml.org/lkml/2014/5/30/669
> 
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>

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

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

end of thread, other threads:[~2016-04-09  1:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 15:55 [PATCH RESEND] vfs: Add support to document max and min inode times Deepa Dinamani
2016-04-09  1:18 ` Arnd Bergmann

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.