linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail.com>
To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org
Cc: tglx@linutronix.de, arnd@arndb.de, viro@zeniv.linux.org.uk
Subject: [PATCH RESEND] vfs: Add support to document max and min inode times
Date: Fri,  8 Apr 2016 08:55:33 -0700	[thread overview]
Message-ID: <1460130933-8307-1-git-send-email-deepa.kernel@gmail.com> (raw)

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


             reply	other threads:[~2016-04-08 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08 15:55 Deepa Dinamani [this message]
2016-04-09  1:18 ` [PATCH RESEND] vfs: Add support to document max and min inode times Arnd Bergmann

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=1460130933-8307-1-git-send-email-deepa.kernel@gmail.com \
    --to=deepa.kernel@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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 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).