All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Maiolino <cmaiolino@redhat.com>
To: grub-devel@gnu.org
Cc: daniel.kiper@oracle.com, javierm@redhat.com
Subject: [PATCH 0/2] Enable bigtime feature for xfs driver
Date: Tue, 23 Mar 2021 14:29:57 +0100	[thread overview]
Message-ID: <20210323132959.1594989-1-cmaiolino@redhat.com> (raw)

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	other threads:[~2021-03-23 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 13:29 Carlos Maiolino [this message]
2021-03-23 13:29 ` [PATCH 1/2] Add bigtime support for xfs driver Carlos Maiolino
2021-04-13 17:12   ` Javier Martinez Canillas
2021-03-23 13:29 ` [PATCH 2/2] Use 64bit type for filesystem timestamp Carlos Maiolino
2021-04-13 17:26   ` Javier Martinez Canillas
2021-03-23 18:09 ` [PATCH 0/2] Enable bigtime feature for xfs driver Daniel Kiper
2021-03-24 10:54   ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210323132959.1594989-1-cmaiolino@redhat.com \
    --to=cmaiolino@redhat.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=javierm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.