[2.06 RELEASE PATCH v3 4/4] fs/xfs: Add needsrepair incompat feature support

2021-05-24 Thread Javier Martinez Canillas
The XFS now has an incompat feature flag to indicate that the filesystem needs to be repaired. The Linux kernel refuses to mount a filesystem that has it set and only the xfs_repair tool is able to clear that flag. The GRUB doesn't have the concept of mounting filesystems and just attempts to read

[2.06 RELEASE PATCH v3 2/4] fs: Use 64-bit type for filesystem timestamp

2021-05-24 Thread Javier Martinez Canillas
From: Carlos Maiolino Some filesystems nowadays uses 64-bit types for timestamps, so, update grub_dirhook_info struct to use an grub_int64_t type to store mtime. This also updates the grub_unixtime2datetime() function to receive a 64-bit timestamp argument and do 64-bit-safe divisions. All the r

[2.06 RELEASE PATCH v3 3/4] fs/xfs: Add bigtime incompat feature support

2021-05-24 Thread Javier Martinez Canillas
From: Carlos Maiolino 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 on 0, which translates to GRUB_INT32_MIN (Dec 31 20:45

[2.06 RELEASE PATCH v3 0/4] Add XFS bigtime and needsrepair support

2021-05-24 Thread Javier Martinez Canillas
Hello, This series contains patches to support incompat feature flags that were recently added to the XFS filesystem. This is needed because GRUB checks if the super block .sb_features_incompat field contains incompat feature flags that are not supported, and if that's the case it considers the SB

[2.06 RELEASE PATCH v3 1/4] types: Define PRI{x, d}GRUB_INT{32, 64}_T format specifiers

2021-05-24 Thread Javier Martinez Canillas
There are already constant macros defined for unsigned integers but no for signed integers. Add macro constants for format specifiers of the latter. Suggested-by: Daniel Kiper Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Kiper --- Changes in v3: - Add dkiper Reviewed-by tag. - F

[PATCHv5] grub-install: Add backup and restore

2021-05-24 Thread Dimitri John Ledkov
From: Dimitri John Ledkov Refactor clean_grub_dir to create a backup of all the files, instead of just irrevocably removing them as the first action. If available, register atexit handle to restore the backup if errors occur before point of no return, or remove the backup if everything was succes