From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lOh79-000534-OL for mharc-grub-devel@gnu.org; Tue, 23 Mar 2021 09:30:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOh73-0004zP-5C for grub-devel@gnu.org; Tue, 23 Mar 2021 09:30:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOh6u-0008P2-8q for grub-devel@gnu.org; Tue, 23 Mar 2021 09:30:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616506213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mrXglcMxzOE1ajIpu6sQMJvEOo6L1OA1GCdcx4vq0Dg=; b=i/a24QBjfmFKOrM46TvJ2QlLHXlzmwel08DqdxPSaV0tEPnamSs17WTsNBbvKG5ZROADG7 GoxMtTGJXmlhnegEbCNmT1Y2DCoVjL/MmeT2JWBE0fz38IzRoqy6kgi6uF54bUDreyEDKh 0g1iM/Mq1hafQQOUUaSZBEzOV9HVUGw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-RGgi8rVlMEyB6z_zvPlfWw-1; Tue, 23 Mar 2021 09:30:10 -0400 X-MC-Unique: RGgi8rVlMEyB6z_zvPlfWw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96311180FCA7; Tue, 23 Mar 2021 13:30:09 +0000 (UTC) Received: from andromeda.redhat.com (unknown [10.40.193.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA702AC83; Tue, 23 Mar 2021 13:30:05 +0000 (UTC) From: Carlos Maiolino 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 Message-Id: <20210323132959.1594989-1-cmaiolino@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cmaiolino@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=63.128.21.124; envelope-from=cmaiolino@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 13:30:27 -0000 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