diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2015-12-09 00:10:21 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-12-16 02:43:25 +0100 |
commit | 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c (patch) | |
tree | 80a554e170d086802976123e14380f46b554abe3 /md_u.h | |
parent | fix bug in assemble (diff) | |
download | mdadm-26714713cd2bad9e0bf7f4669f6cc4659ceaab6c.tar.xz mdadm-26714713cd2bad9e0bf7f4669f6cc4659ceaab6c.zip |
mdadm: Change timestamps to unsigned data type.
32 bit signed timestamps will overflow in the year 2038.
Change the user interface mdu_array_info_s structure timestamps:
ctime and utime values used in ioctls GET_ARRAY_INFO and
SET_ARRAY_INFO to unsigned int. This will extend the field to last
until the year 2106.
Add time_after/time_before and supporting typecheck from
the kernel to take care of unsigned time wraparound.
The long term plan is to get rid of ctime and utime values in
this structure as this information can be read from the on-disk
meta data directly.
v0.90 on disk meta data uses u32 for maintaining time stamps.
So this will also last until year 2106.
Assumption is that the usage of v0.90 will be deprecated by
year 2106.
Timestamp fields in the on disk meta data for v1.0 version already
use 64 bit data types.
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'md_u.h')
-rw-r--r-- | md_u.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -59,7 +59,7 @@ typedef struct mdu_array_info_s { int major_version; int minor_version; int patch_version; - int ctime; + unsigned int ctime; int level; int size; int nr_disks; @@ -70,7 +70,7 @@ typedef struct mdu_array_info_s { /* * Generic state information */ - int utime; /* 0 Superblock update time */ + unsigned int utime; /* 0 Superblock update time */ int state; /* 1 State bits (clean, ...) */ int active_disks; /* 2 Number of currently active disks */ int working_disks; /* 3 Number of working disks */ |