On Thu, Nov 03, 2016 at 09:48:27AM +1100, Dave Chinner wrote:
> On Wed, Nov 02, 2016 at 08:04:50AM -0700, Deepa Dinamani wrote:
> > The series is aimed at adding timestamp checking and policy
> > related to it to vfs.
> >
> > The series was developed with discussions and guidance from
> > Arnd Ber
On Wed, Nov 02, 2016 at 08:04:50AM -0700, Deepa Dinamani wrote:
> The series is aimed at adding timestamp checking and policy
> related to it to vfs.
>
> The series was developed with discussions and guidance from
> Arnd Bergmann.
>
> The original idea for the series was the discussion:
> https:/
Allow read only mounts for filesystems that do not
have maximum timestamps beyond the y2038 expiry
timestamp.
Also, allow a sysctl override to all such filesystems
to be mounted with write permissions.
Alternatively, a mount option can be created to allow or
disallow range check based clamps and
POSIX.1 section for futimens, utimensat and utimes says:
The file's relevant timestamp shall be set to the
greatest value supported by the file system that is
not greater than the specified time.
Clamp the timestamps accordingly before assignment.
Note that clamp_t macro is used for clamping here
timespec_trunc() function is used to truncate a
filesystem timestamp to the right granularity.
But, the function does not clamp tv_sec part of the
timestamps according to the filesystem timestamp limits.
Also, timespec_trunc() is exclusively used for filesystem
timestamps. Move the api to be part
ext4 has different overflow limits for max filesystem
timestamps based on the extra bytes available.
Signed-off-by: Deepa Dinamani
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: linux-e...@vger.kernel.org
---
fs/ext4/ext4.h | 4
fs/ext4/super.c | 7 ++-
2 files changed, 10 insertions(+),
Add fields to the superblock to track the min and max
timestamps supported by filesystems.
Initially, when a superblock is allocated, initialize
it to the max and min values the fields can hold.
Individual filesystems override these to match their
actual limits.
Pseudo filesystems are assumed to
Note that all the filesystems that have such simple limits
will be initialized in the same patch.
Signed-off-by: Deepa Dinamani
Cc: linux-...@lists.infradead.org
---
fs/afs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/afs/super.c b/fs/afs/super.c
index fbdb022..ab00434 100644
The series is aimed at adding timestamp checking and policy
related to it to vfs.
The series was developed with discussions and guidance from
Arnd Bergmann.
The original idea for the series was the discussion:
https://lkml.org/lkml/2014/5/30/551
Patches 5 and 6 can be merged only after vfs is tr