xfsprogs/xfsprogs-rhelonly-disable-old-kernel-bigtime-inobtcnt-on.patch
Pavel Reichl c49945ae5f Rebase to upstream version 6.3.0
-
Following is a list of dropped backported patches which
are contained in the current rebase:
xfsprogs-5.19.0-xfs-hoist-refcount-record-merge-predicates.patch (v6.2.0)
xfsprogs-5.19.0-xfs_db-fix-dir3-block-magic-check.patch (v6.1.0)
xfsprogs-5.19.0-xfs-estimate-post-merge-refcounts-correctly.patch (v6.2.0)
xfsprogs-5.19.0-xfs-get-rid-of-assert-from-xfs_btree_islastblock.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-off-by-one-error-in-xfs_btree_space_to_heigh.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-sb-write-verify-for-lazysbcount.patch (v6.1.0)
xfsprogs-5.19.0-xfs-removed-useless-condition-in-function-xfs_attr_n.patch (v6.0.0)
xfsprogs-5.19.0-xfs_repair-retain-superblock-buffer-to-avoid-write-h.patch (v6.1.0)
-
Rename the remaining patches so the name contains upstream version in which
they are implemented, or "rhelonly".
-
Drop Eric Sandeen's public key used to check tarball signature and replace it by
Carlos Maiolino's (current upstream xfsprogs maintainer).
-
Following is a list of newly backported patches from versions released after 6.3
which are fixing patches present in version 6.3:
xfsprogs-6.4.0-xfs_repair-don-t-add-junked-entries-to-the-rebuilt-d.patch
xfsprogs-6.4.0-xfs_repair-don-t-spray-correcting-imap-all-by-itself.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-fixing-imap-due-to-spa.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-shortform_dir2_junk-is.patch
-
Backport:
xfsprogs-6.4.0-xfs_db-move-obfuscate_name-assertion-to-callers.patch
xfsprogs-6.4.0-xfs_db-fix-metadump-name-obfuscation-for-ascii-ci-fi.patch
xfsprogs-6.4.0-xfs-stabilize-the-dirent-name-transformation-functio.patch
to implement RHEL-RHEL-8284
-
Backport xfsprogs-rhelonly-xfs_quota-fix-missing-mount-point-warning.patch
to implement RHEL-7900
-
Resolves: RHEL-15399
Resolves: RHEL-8284
Resolves: RHEL-7900

Signed-off-by: Pavel Reichl <preichl@redhat.com>
2023-11-14 22:44:52 +01:00

53 lines
1.2 KiB
Diff

--- a/mkfs/xfs_mkfs.c.orig 2022-08-12 20:38:21.000000000 +0200
+++ b/mkfs/xfs_mkfs.c 2023-01-25 11:06:01.863076713 +0100
@@ -13,6 +13,8 @@
#include "libfrog/dahashselftest.h"
#include "proto.h"
#include <ini.h>
+#include <linux/version.h>
+#include <sys/utsname.h>
#define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))
#define GIGABYTES(count, blog) ((uint64_t)(count) << (30 - (blog)))
@@ -3998,6 +4000,23 @@
cli->cfgfile);
}
+static unsigned int get_system_kver(void)
+{
+ const char *kver = getenv("KVER");
+ struct utsname utsname;
+ int a, b, c;
+
+ if (!kver) {
+ uname(&utsname);
+ kver = utsname.release;
+ }
+
+ if (sscanf(kver, "%d.%d.%d", &a, &b, &c) != 3)
+ return LINUX_VERSION_CODE;
+
+ return KERNEL_VERSION(a,b,c);
+}
+
int
main(
int argc,
@@ -4077,8 +4096,16 @@
};
struct list_head buffer_list;
+ unsigned int kver;
int error;
+ /* turn bigtime & inobtcnt back off if running under older kernels */
+ kver = get_system_kver();
+ if (kver < KERNEL_VERSION(5,10,0)) {
+ dft.sb_feat.inobtcnt = false;
+ dft.sb_feat.bigtime = false;
+ }
+
platform_uuid_generate(&cli.uuid);
progname = basename(argv[0]);
setlocale(LC_ALL, "");