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>
This commit is contained in:

committed by
Theodore Ts'o

parent
b42d1d6b5b
commit
6a0678a79b
@@ -1295,7 +1295,14 @@ struct ext4_super_block {
|
||||
__le32 s_lpf_ino; /* Location of the lost+found inode */
|
||||
__le32 s_prj_quota_inum; /* inode for tracking project quota */
|
||||
__le32 s_checksum_seed; /* crc32c(uuid) if csum_seed set */
|
||||
__le32 s_reserved[98]; /* Padding to the end of the block */
|
||||
__u8 s_wtime_hi;
|
||||
__u8 s_mtime_hi;
|
||||
__u8 s_mkfs_time_hi;
|
||||
__u8 s_lastcheck_hi;
|
||||
__u8 s_first_error_time_hi;
|
||||
__u8 s_last_error_time_hi;
|
||||
__u8 s_pad[2];
|
||||
__le32 s_reserved[96]; /* Padding to the end of the block */
|
||||
__le32 s_checksum; /* crc32c(superblock) */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user