]> git.ipfire.org Git - people/ms/linux.git/commit - fs/namespace.c
mount: Add mount warning for impending timestamp expiry
authorDeepa Dinamani <deepa.kernel@gmail.com>
Mon, 15 Apr 2019 21:17:12 +0000 (14:17 -0700)
committerDeepa Dinamani <deepa.kernel@gmail.com>
Fri, 30 Aug 2019 14:27:17 +0000 (07:27 -0700)
commitf8b92ba67c5d3a9e9468320078a97d950a3e748b
treee304b92a7334a92f29bf69654331c76134373f49
parent3818c1907a5e4e8fbd57fb14cea77de7c507111a
mount: Add mount warning for impending timestamp expiry

The warning reuses the uptime max of 30 years used by
settimeofday().

Note that the warning is only emitted for writable filesystem mounts
through the mount syscall. Automounts do not have the same warning.

Print out the warning in human readable format using the struct tm.
After discussion with Arnd Bergmann, we chose to print only the year number.
The raw s_time_max is also displayed, and the user can easily decode
it e.g. "date -u -d @$((0x7fffffff))". We did not want to consolidate
struct rtc_tm and struct tm just to print the date using a format specifier
as part of this series.
Given that the rtc_tm is not compiled on all architectures, this is not a
trivial patch. This can be added in the future.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
fs/namespace.c