grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] Enable bigtime feature for xfs driver


From: Carlos Maiolino
Subject: [PATCH 0/2] Enable bigtime feature for xfs driver
Date: Tue, 23 Mar 2021 14:29:57 +0100

Hello.
First, my apologies if I messed up with code styling here somehow, it's the
first time I send a patch to grub.

This series enable grub's xfs driver to recognize new xfs's feature bigtime,
which aims to fix the y2038 timestamps problems.

The first patch in the series is the xfs driver implementation to read the new
timestamp format from disk (or the old one if that's the case) and convert it to
epoch seconds before passing it back to grub's core. It's self contained and the
result, it larger than INT_MAX, is implicitly truncated when passing it back to
grub core, so it will overflow the timestamps anyway.

The second patch (and this is more like a RFC since I am very new to grub's
code), aims to update grub itself to support 64bit timestamps by converting its
filesystems drivers to pass a 64bit value back to grub's core and convert
grub_unixtime2datetime() to support 64bit timestamp handling.

I tested these patches on both x86_64 and x86_32 and in my testing they worked
as expected, but again, I am new to grub code, so I might have missed some
corner cases.

Carlos Maiolino (2):
  Add bigtime support for xfs driver
  Use 64bit type for filesystem timestamp

 grub-core/fs/affs.c          |  2 +-
 grub-core/fs/ext2.c          |  2 +-
 grub-core/fs/fat.c           |  4 +--
 grub-core/fs/hfs.c           |  2 +-
 grub-core/fs/hfsplus.c       |  2 +-
 grub-core/fs/iso9660.c       |  6 ++--
 grub-core/fs/nilfs2.c        |  2 +-
 grub-core/fs/squash4.c       |  2 +-
 grub-core/fs/ufs.c           |  2 +-
 grub-core/fs/xfs.c           | 69 ++++++++++++++++++++++++++++--------
 grub-core/fs/zfs/zfs.c       |  2 +-
 grub-core/lib/datetime.c     | 15 ++++++--
 grub-core/net/bootp.c        |  2 +-
 grub-core/normal/misc.c      |  2 +-
 grub-core/tests/sleep_test.c |  4 +--
 include/grub/datetime.h      |  4 +--
 include/grub/fs.h            |  4 +--
 17 files changed, 87 insertions(+), 39 deletions(-)

-- 
2.29.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]