summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-07-29 15:51:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-07-29 15:51:48 -0400
commit6a0678a79bb3a4e5fc1b680e7afc78727e21aff3 (patch)
treee86f4d3e34620c66c4ed18d890650012d584a87c /fs/ext4/ext4.h
parentb42d1d6b5b789c41dacbe2bc192c7b359d109d7b (diff)
ext4: super: extend timestamps to 40 bits
The inode timestamps use 34 bits in ext4, but the various timestamps in the superblock are limited to 32 bits. If every user accesses these as 'unsigned', then this is good until year 2106, but it seems better to extend this a bit further in the process of removing the deprecated get_seconds() function. This adds another byte for each timestamp in the superblock, making them long enough to store timestamps beyond what is in the inodes, which seems good enough here (in ocfs2, they are already 64-bit wide, which is appropriate for a new layout). I did not modify e2fsprogs, which obviously needs the same change to actually interpret future timestamps correctly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 1d7dac2df6e8..6d7dec48372b 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1295,7 +1295,14 @@ struct ext4_super_block {
1295 __le32 s_lpf_ino; /* Location of the lost+found inode */ 1295 __le32 s_lpf_ino; /* Location of the lost+found inode */
1296 __le32 s_prj_quota_inum; /* inode for tracking project quota */ 1296 __le32 s_prj_quota_inum; /* inode for tracking project quota */
1297 __le32 s_checksum_seed; /* crc32c(uuid) if csum_seed set */ 1297 __le32 s_checksum_seed; /* crc32c(uuid) if csum_seed set */
1298 __le32 s_reserved[98]; /* Padding to the end of the block */ 1298 __u8 s_wtime_hi;
1299 __u8 s_mtime_hi;
1300 __u8 s_mkfs_time_hi;
1301 __u8 s_lastcheck_hi;
1302 __u8 s_first_error_time_hi;
1303 __u8 s_last_error_time_hi;
1304 __u8 s_pad[2];
1305 __le32 s_reserved[96]; /* Padding to the end of the block */
1299 __le32 s_checksum; /* crc32c(superblock) */ 1306 __le32 s_checksum; /* crc32c(superblock) */
1300}; 1307};
1301 1308