]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/xfs: Add bigtime incompat feature support
authorCarlos Maiolino <cmaiolino@redhat.com>
Mon, 24 May 2021 17:40:06 +0000 (19:40 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 1 Jun 2021 15:20:20 +0000 (17:20 +0200)
commit8b1e5d1936fffc490510e85c95f93248453586c1
tree4c99869112a541e9be0a9ec568c46d4149dbec3a
parent81f1962393f4403e2b6b127f23524a962a236afb
fs/xfs: Add bigtime incompat feature support

The XFS filesystem supports a bigtime feature to overcome y2038 problem.
This patch makes the GRUB able to support the XFS filesystems with this
feature enabled.

The XFS counter for the bigtime enabled timestamps starts at 0, which
translates to GRUB_INT32_MIN (Dec 31 20:45:52 UTC 1901) in the legacy
timestamps. The conversion to Unix timestamps is made before passing the
value to other GRUB functions.

For this to work properly, GRUB requires an access to flags2 field in the
XFS ondisk inode. So, the grub_xfs_inode structure has been updated to
cover full ondisk inode.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/xfs.c
include/grub/time.h