openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2020
- 1 participants
- 4645 discussions
Hello community,
here is the log from the commit of package kernel-source for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/kernel-source (Old)
and /work/SRC/openSUSE:Leap:15.2/.kernel-source.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kernel-source"
Sun May 31 13:45:29 2020 rev:124 rq:809759 version:5.3.18
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/kernel-source/dtb-aarch64.changes 2020-05-24 18:06:00.829761890 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.kernel-source.new.3606/dtb-aarch64.changes 2020-05-31 13:45:39.837663341 +0200
@@ -1,0 +2,83 @@
+Wed May 27 12:35:55 CEST 2020 - mkubecek(a)suse.cz
+
+- series.conf: cleanup
+- update upstream reference and resort:
+ patches.suse/s390-kexec_file-fix-initrd-location-for-kdump-kernel.patch
+- update upstream reference and move into sorted section:
+ patches.suse/x86-microcode-amd-increase-microcode-patch_max_size.patch
+- move into sorted section:
+ patches.suse/signal-avoid-double-atomic-counter-increments-for-user-accounting.patch
+ No effect on expanded tree.
+- commit 571cf9a
+
+-------------------------------------------------------------------
+Wed May 27 11:44:24 CEST 2020 - mkubecek(a)suse.cz
+
+- series.conf: cleanup
+- update upstream references and move into sorted section:
+ patches.suse/cifs-add-SMB2_open-arg-to-return-POSIX-data.patch
+ patches.suse/cifs-add-smb2-POSIX-info-level.patch
+ patches.suse/cifs-call-wake_up-server-response_q-inside-of-cifs_r.patch
+ patches.suse/cifs-do-d_move-in-rename.patch
+ patches.suse/cifs-do-not-ignore-the-SYNC-flags-in-getattr.patch
+ patches.suse/cifs-handle-prefix-paths-in-reconnect.patch
+ patches.suse/cifs-make-use-of-cap_unix-ses-in-cifs_reconnect_tcon.patch
+ patches.suse/cifs-plumb-smb2-POSIX-dir-enumeration.patch
+ patches.suse/cifs-potential-unintitliazed-error-code-in-cifs_geta.patch
+ patches.suse/cifs-rename-posix-create-rsp.patch
+ patches.suse/cifs-use-mod_delayed_work-for-server-reconnect-if-al.patch
+ patches.suse/smb3-fix-performance-regression-with-setting-mtime.patch
+- update to mainline version, rename and move into sorted section:
+ patches.suse/cifs-print-warning-once-if-mounting-with-vers-1.0.patch -> patches.suse/cifs-print-warning-mounting-with-vers-1-0.patch
+ No relevant effect on expanded tree:
+ diff -urN old/fs/cifs/connect.c new/fs/cifs/connect.c
+ --- old/fs/cifs/connect.c 2020-05-27 11:46:54.090968292 +0200
+ +++ new/fs/cifs/connect.c 2020-05-27 11:46:54.990971522 +0200
+ @@ -1466,8 +1466,8 @@
+ cifs_dbg(VFS, "vers=1.0 (cifs) not permitted when mounting with smb3\n");
+ return 1;
+ }
+ - printk_once(KERN_WARNING "Use of the less secure dialect "
+ - "vers=1.0 is not recommended unless required for "
+ + cifs_dbg(VFS, "Use of the less secure dialect vers=1.0 "
+ + "is not recommended unless required for "
+ "access to very old servers\n");
+ vol->ops = &smb1_operations;
+ vol->vals = &smb1_values;
+ diff -urN old/fs/cifs/smb2ops.c new/fs/cifs/smb2ops.c
+ --- old/fs/cifs/smb2ops.c 2020-05-27 11:46:54.074968234 +0200
+ +++ new/fs/cifs/smb2ops.c 2020-05-27 11:46:54.974971463 +0200
+ @@ -3020,7 +3020,7 @@
+ oparms.fid = &fid;
+ oparms.reconnect = false;
+ - rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL,NULL, NULL,
+ + rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, NULL,
+ NULL);
+ kfree(utf16_path);
+ if (!rc) {
+ --
+- commit f7dacbf
+
+-------------------------------------------------------------------
+Tue May 26 23:57:30 CEST 2020 - jkosina(a)suse.cz
+
+- Refresh
+ patches.suse/block-floppy-fix-contended-case-in-floppy_queue_rq.patch:
+ update upstream references (submitted -> applied).
+- commit fce9354
+
+-------------------------------------------------------------------
+Tue May 26 20:48:11 CEST 2020 - jkosina(a)suse.cz
+
+- block/floppy: fix contended case in floppy_queue_rq()
+ (bsc#1171426).
+- commit 18ed9ad
+
+-------------------------------------------------------------------
+Wed May 20 21:00:43 CEST 2020 - mkubecek(a)suse.cz
+
+- Update kabi files.
+- update to "RC3" submission (commit de1e6fb20e9d)
+- commit 8f25cbe
+
+-------------------------------------------------------------------
dtb-armv7l.changes: same change
kernel-debug.changes: same change
kernel-default.changes: same change
kernel-docs.changes: same change
kernel-kvmsmall.changes: same change
kernel-lpae.changes: same change
kernel-obs-build.changes: same change
kernel-obs-qa.changes: same change
kernel-preempt.changes: same change
kernel-source.changes: same change
kernel-syms.changes: same change
kernel-zfcpdump.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dtb-aarch64.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:45.993682389 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:45.997682402 +0200
@@ -31,7 +31,7 @@
Name: dtb-aarch64
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
dtb-armv7l.spec: same change
++++++ kernel-debug.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.037682526 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.041682538 +0200
@@ -67,7 +67,7 @@
Group: System/Kernel
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -174,10 +174,10 @@
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
-Provides: kernel-%build_flavor-base-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
-Provides: kernel-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: kernel-%build_flavor-base-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
+Provides: kernel-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
# END COMMON DEPS
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
++++++ kernel-default.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.061682600 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.065682612 +0200
@@ -67,7 +67,7 @@
Group: System/Kernel
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -174,10 +174,10 @@
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
-Provides: kernel-%build_flavor-base-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
-Provides: kernel-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: kernel-%build_flavor-base-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
+Provides: kernel-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
# END COMMON DEPS
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%ifarch s390x
Provides: kernel-trace = 3.13
Obsoletes: kernel-trace <= 3.13
++++++ kernel-docs.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.085682674 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.085682674 +0200
@@ -33,7 +33,7 @@
Group: Documentation/Man
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -63,7 +63,7 @@
%endif
Url: http://www.kernel.org/
Provides: %name = %version-%source_rel
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
++++++ kernel-kvmsmall.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.105682736 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.109682748 +0200
@@ -67,7 +67,7 @@
Group: System/Kernel
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -174,10 +174,10 @@
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
-Provides: kernel-%build_flavor-base-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
-Provides: kernel-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: kernel-%build_flavor-base-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
+Provides: kernel-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
# END COMMON DEPS
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
kernel-lpae.spec: same change
++++++ kernel-obs-build.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.149682872 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.153682885 +0200
@@ -45,7 +45,7 @@
%endif
%endif
%endif
-BuildRequires: kernel%kernel_flavor-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+BuildRequires: kernel%kernel_flavor-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%if 0%{?rhel_version}
BuildRequires: kernel
@@ -66,7 +66,7 @@
Group: SLES
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
++++++ kernel-obs-qa.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.169682934 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.173682946 +0200
@@ -38,7 +38,7 @@
Group: SLES
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
++++++ kernel-preempt.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.189682996 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.193683008 +0200
@@ -67,7 +67,7 @@
Group: System/Kernel
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -174,10 +174,10 @@
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
-Provides: kernel-%build_flavor-base-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
-Provides: kernel-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: kernel-%build_flavor-base-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
+Provides: kernel-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
# END COMMON DEPS
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
++++++ kernel-source.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.209683058 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.213683070 +0200
@@ -32,7 +32,7 @@
Group: Development/Sources
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -43,7 +43,7 @@
BuildRequires: sed
Requires(post): coreutils sed
Provides: %name = %version-%source_rel
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
Provides: linux
Provides: multiversion(kernel)
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
++++++ kernel-syms.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.233683132 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.237683145 +0200
@@ -27,7 +27,7 @@
Version: 5.3.18
%if %using_buildservice
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -49,7 +49,7 @@
%endif
Requires: pesign-obs-integration
Provides: %name = %version-%source_rel
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
Provides: multiversion(kernel)
Source: README.KSYMS
Requires: kernel-devel%variant = %version-%source_rel
++++++ kernel-zfcpdump.spec ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:46.261683219 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:46.261683219 +0200
@@ -67,7 +67,7 @@
Group: System/Kernel
Version: 5.3.18
%if 0%{?is_kotd}
-Release: <RELEASE>.g4cdc2b7
+Release: <RELEASE>.g36ec261
%else
Release: 0
%endif
@@ -174,10 +174,10 @@
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
-Provides: kernel-%build_flavor-base-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
-Provides: kernel-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: kernel-%build_flavor-base-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
+Provides: kernel-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
# END COMMON DEPS
-Provides: %name-srchash-4cdc2b790f7504b3ad71189d68f78020ff467c11
+Provides: %name-srchash-36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
++++++ patches.suse.tar.bz2 ++++++
/work/SRC/openSUSE:Leap:15.2/kernel-source/patches.suse.tar.bz2 /work/SRC/openSUSE:Leap:15.2/.kernel-source.new.3606/patches.suse.tar.bz2 differ: char 11, line 1
++++++ series.conf ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:47.169686029 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:47.173686041 +0200
@@ -10438,6 +10438,7 @@
patches.suse/kvm-nvmx-don-t-emulate-instructions-in-guest-mode
patches.suse/kvm-nvmx-refactor-io-bitmap-checks-into-helper-function
patches.suse/kvm-nvmx-check-io-instruction-vm-exit-conditions
+ patches.suse/signal-avoid-double-atomic-counter-increments-for-user-accounting.patch
patches.suse/selftests-Install-settings-files-to-fix-TIMEOUT-fail.patch
patches.suse/tracing-disable-trace_printk-on-post-poned-tests.patch
patches.suse/audit-fix-error-handling-in-audit_data_to_entry.patch
@@ -10714,6 +10715,7 @@
patches.suse/mm-slub-be-more-careful-about-the-double-cmpxchg-of-freelist.patch
patches.suse/rtc-max8907-add-missing-select-REGMAP_IRQ.patch
patches.suse/modpost-move-the-namespace-field-in-Module.symvers-last.patch
+ patches.suse/cifs-potential-unintitliazed-error-code-in-cifs_geta.patch
patches.suse/mmc-sdhci-cadence-set-SDHCI_QUIRK2_PRESET_VALUE_BROK.patch
patches.suse/mmc-sdhci-of-at91-fix-cd-gpios-for-SAMA5D2.patch
patches.suse/mmc-rtsx_pci-Fix-support-for-speed-modes-that-relies.patch
@@ -11048,6 +11050,18 @@
patches.suse/0001-btrfs-relocation-add-error-injection-points-for-canc.patch
patches.suse/0002-btrfs-relocation-Check-cancel-request-after-each-dat.patch
patches.suse/0003-btrfs-relocation-Check-cancel-request-after-each-ext.patch
+ patches.suse/cifs-do-not-ignore-the-SYNC-flags-in-getattr.patch
+ patches.suse/cifs-handle-prefix-paths-in-reconnect.patch
+ patches.suse/cifs-call-wake_up-server-response_q-inside-of-cifs_r.patch
+ patches.suse/cifs-use-mod_delayed_work-for-server-reconnect-if-al.patch
+ patches.suse/cifs-make-use-of-cap_unix-ses-in-cifs_reconnect_tcon.patch
+ patches.suse/smb3-fix-performance-regression-with-setting-mtime.patch
+ patches.suse/cifs-print-warning-mounting-with-vers-1-0.patch
+ patches.suse/cifs-rename-posix-create-rsp.patch
+ patches.suse/cifs-add-smb2-POSIX-info-level.patch
+ patches.suse/cifs-plumb-smb2-POSIX-dir-enumeration.patch
+ patches.suse/cifs-add-SMB2_open-arg-to-return-POSIX-data.patch
+ patches.suse/cifs-do-d_move-in-rename.patch
patches.suse/selinux-sel_avc_get_stat_idx-should-increase-positio.patch
patches.suse/modpost-return-error-if-module-is-missing-ns-imports.patch
patches.suse/mmc-sdhci-introduce-sdhci_set_power_and_bus_voltage.patch
@@ -11769,6 +11783,7 @@
patches.suse/proc-time-namespace-Show-clock-symbolic-names-in-pro.patch
patches.suse/objtool-fix-switch-table-detection-in-text-unlikely.patch
patches.suse/objtool-make-bp-scratch-register-warning-more-robust.patch
+ patches.suse/x86-microcode-amd-increase-microcode-patch_max_size.patch
patches.suse/tpm-fix-wrong-return-value-in-tpm_pcr_extend.patch
patches.suse/tpm-tpm_tis-Free-IRQ-if-probing-fails.patch
patches.suse/KVM-s390-Return-last-valid-slot-if-approx-index-is-o.patch
@@ -12017,8 +12032,6 @@
patches.suse/clk-rockchip-fix-incorrect-configuration-of-rk3228-a.patch
patches.suse/ima-Set-file-f_mode-instead-of-file-f_flags-in-ima_c.patch
patches.suse/ima-Fix-return-value-of-ima_write_policy.patch
-
- # s390/linux fixes
patches.suse/s390-kexec_file-fix-initrd-location-for-kdump-kernel.patch
########################################################
@@ -12042,22 +12055,8 @@
patches.suse/powerpc-pseries-group-lmb-operation-and-memblock-s.patch
patches.suse/powerpc-pseries-update-device-tree-before-ejecting-h.patch
patches.suse/drivers-base-memory.c-cache-blocks-in-radix-tree-to-.patch
- patches.suse/cifs-do-not-ignore-the-SYNC-flags-in-getattr.patch
- patches.suse/cifs-potential-unintitliazed-error-code-in-cifs_geta.patch
- patches.suse/cifs-handle-prefix-paths-in-reconnect.patch
- patches.suse/cifs-call-wake_up-server-response_q-inside-of-cifs_r.patch
- patches.suse/cifs-use-mod_delayed_work-for-server-reconnect-if-al.patch
- patches.suse/cifs-make-use-of-cap_unix-ses-in-cifs_reconnect_tcon.patch
- patches.suse/smb3-fix-performance-regression-with-setting-mtime.patch
- patches.suse/cifs-print-warning-once-if-mounting-with-vers-1.0.patch
- patches.suse/cifs-rename-posix-create-rsp.patch
- patches.suse/cifs-add-smb2-POSIX-info-level.patch
- patches.suse/cifs-plumb-smb2-POSIX-dir-enumeration.patch
- patches.suse/cifs-add-SMB2_open-arg-to-return-POSIX-data.patch
- patches.suse/cifs-do-d_move-in-rename.patch
patches.suse/Deprecate-NR_UNSTABLE_NFS-use-NR_WRITEBACK.patch
patches.suse/MM-replace-PF_LESS_THROTTLE-with-PF_LOCAL_THROTTLE.patch
- patches.suse/x86-microcode-amd-increase-microcode-patch_max_size.patch
patches.suse/edac-skx-i10nm-make-some-configurations-cpu-model-specific.patch
patches.suse/edac-i10nm-update-driver-to-support-different-bus-number-config-register-offsets.patch
patches.suse/x86-cpu-add-a-steppings-field-to-struct-x86_cpu_id.patch
@@ -12259,6 +12258,7 @@
patches.suse/Revert-nvme-allow-64-bit-results-in-passthru-command.patch
patches.suse/md-raid0-fix-buffer-overflow-at-debug-print.patch
patches.suse/bfq-tune-slice-idle.patch
+ patches.suse/block-floppy-fix-contended-case-in-floppy_queue_rq.patch
########################################################
# Networking core
@@ -12316,7 +12316,6 @@
########################################################
# Other core patches
########################################################
- patches.suse/signal-avoid-double-atomic-counter-increments-for-user-accounting.patch
patches.suse/cgroup-rstat-Revert-cgroup-Add-memory-barriers-to-plug-cgroup_rstat_updated-race-window.patch
########################################################
++++++ source-timestamp ++++++
--- /var/tmp/diff_new_pack.gM2KSk/_old 2020-05-31 13:45:47.209686152 +0200
+++ /var/tmp/diff_new_pack.gM2KSk/_new 2020-05-31 13:45:47.209686152 +0200
@@ -1,3 +1,3 @@
-2020-05-20 10:58:03 +0000
-GIT Revision: 4cdc2b790f7504b3ad71189d68f78020ff467c11
+2020-05-27 10:39:39 +0000
+GIT Revision: 36ec261e6d17e6c6dfb9aab0ea8d86ae34bf6d0f
GIT Branch: openSUSE-15.2
1
0
Hello community,
here is the log from the commit of package python-maxminddb for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-maxminddb (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-maxminddb.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-maxminddb"
Sun May 31 13:45:30 2020 rev:13 rq:809781 version:1.5.4
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-maxminddb/python-maxminddb.changes 2020-03-31 07:21:29.178375014 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.python-maxminddb.new.3606/python-maxminddb.changes 2020-05-31 13:45:47.437686858 +0200
@@ -1,0 +2,10 @@
+Thu May 7 18:17:12 UTC 2020 - Sebastian Wagner <sebix+novell.com(a)sebix.at>
+
+- update to version 1.5.4:
+ - 1.5.3 was missing a test database. This release adds the test file.
+ There are no other changes. Reported by Lumír 'Frenzy' Balhar. GitHub #60.
+- update to version 1.5.3:
+ - Fix a segfault when decoding a database with a corrupt data section.
+ Reported by Robert Scott. GitHub #58.
+
+-------------------------------------------------------------------
Old:
----
maxminddb-1.5.2.tar.gz
New:
----
maxminddb-1.5.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-maxminddb.spec ++++++
--- /var/tmp/diff_new_pack.0xkyxu/_old 2020-05-31 13:45:47.781687922 +0200
+++ /var/tmp/diff_new_pack.0xkyxu/_new 2020-05-31 13:45:47.785687934 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-maxminddb
-Version: 1.5.2
+Version: 1.5.4
Release: 0
Summary: Reader for the MaxMind DB format
License: Apache-2.0
++++++ maxminddb-1.5.2.tar.gz -> maxminddb-1.5.4.tar.gz ++++++
++++ 2511 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package meson for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/meson (Old)
and /work/SRC/openSUSE:Leap:15.2/.meson.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson"
Sun May 31 13:45:27 2020 rev:52 rq:809619 version:0.54.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/meson/meson.changes 2020-05-20 09:06:19.492266177 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.meson.new.3606/meson.changes 2020-05-31 13:45:36.549653167 +0200
@@ -1,0 +2,15 @@
+Wed May 20 19:27:23 UTC 2020 - Michael Gorse <mgorse(a)suse.com>
+
+- Make tests arch-dependent. Needed to exclude mono tests on s390x
+ (bsc#1171934).
+
+-------------------------------------------------------------------
+Fri May 15 10:23:21 UTC 2020 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Update to version 0.54.2:
+ + Various fixes around boost.
+ + More robust cmake version detection.
+ + Various GCC10 related fixes.
+- Drop meson-gcc10.patch: fixed upstream.
+
+-------------------------------------------------------------------
Old:
----
meson-0.54.1.tar.gz
meson-0.54.1.tar.gz.asc
meson-gcc10.patch
New:
----
meson-0.54.2.tar.gz
meson-0.54.2.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ meson.spec ++++++
--- /var/tmp/diff_new_pack.AbH0Xa/_old 2020-05-31 13:45:37.037654677 +0200
+++ /var/tmp/diff_new_pack.AbH0Xa/_new 2020-05-31 13:45:37.041654689 +0200
@@ -28,7 +28,7 @@
%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
%bcond_with setuptools
Name: meson%{name_ext}
-Version: 0.54.1
+Version: 0.54.2
Release: 0
Summary: Python-based build system
License: Apache-2.0
@@ -49,12 +49,12 @@
Patch4: meson-fix-gcc48.patch
# PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal(a)suse.com -- build and install using distutils instead of full setuptools
Patch5: meson-distutils.patch
-# PATCH-FIX-UPSTREAM dimstar(a)opensuse.org -- Fix test suite with GCC 10
-Patch6: meson-gcc10.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-base
+%if "%{flavor}" != "test"
BuildArch: noarch
+%endif
%if %{with setuptools}
BuildRequires: python3-setuptools
Requires: python3-setuptools
@@ -173,7 +173,6 @@
%if !%{with setuptools}
%patch5 -p1
%endif
-%patch6 -p1
# We do not have gmock available at this moment - can't run the test suite for it
rm -r "test cases/frameworks/3 gmock" \
++++++ meson-0.54.1.tar.gz -> meson-0.54.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/PKG-INFO new/meson-0.54.2/PKG-INFO
--- old/meson-0.54.1/PKG-INFO 2020-04-26 11:09:31.108047200 +0200
+++ new/meson-0.54.2/PKG-INFO 2020-05-15 09:24:43.618322600 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: meson
-Version: 0.54.1
+Version: 0.54.2
Summary: A high performance build system
Home-page: https://mesonbuild.com
Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/man/meson.1 new/meson-0.54.2/man/meson.1
--- old/meson-0.54.1/man/meson.1 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/man/meson.1 2020-05-15 09:23:18.000000000 +0200
@@ -1,4 +1,4 @@
-.TH MESON "1" "April 2020" "meson 0.54.1" "User Commands"
+.TH MESON "1" "May 2020" "meson 0.54.2" "User Commands"
.SH NAME
meson - a high productivity build system
.SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/meson.egg-info/PKG-INFO new/meson-0.54.2/meson.egg-info/PKG-INFO
--- old/meson-0.54.1/meson.egg-info/PKG-INFO 2020-04-26 11:09:19.000000000 +0200
+++ new/meson-0.54.2/meson.egg-info/PKG-INFO 2020-05-15 09:24:26.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: meson
-Version: 0.54.1
+Version: 0.54.2
Summary: A high performance build system
Home-page: https://mesonbuild.com
Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/meson.egg-info/SOURCES.txt new/meson-0.54.2/meson.egg-info/SOURCES.txt
--- old/meson-0.54.1/meson.egg-info/SOURCES.txt 2020-04-26 11:09:19.000000000 +0200
+++ new/meson-0.54.2/meson.egg-info/SOURCES.txt 2020-05-15 09:24:26.000000000 +0200
@@ -1124,6 +1124,9 @@
test cases/common/23 object extraction/meson.build
test cases/common/23 object extraction/src/lib.c
test cases/common/230 arithmetic operators/meson.build
+test cases/common/233 link depends indexed custom target/foo.c
+test cases/common/233 link depends indexed custom target/make_file.py
+test cases/common/233 link depends indexed custom target/meson.build
test cases/common/24 endian/meson.build
test cases/common/24 endian/prog.c
test cases/common/25 library versions/lib.c
@@ -2125,6 +2128,9 @@
test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c
test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h
test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build
+test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c
+test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h
+test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build
test cases/frameworks/7 gnome/mkenums/enums.c.in
test cases/frameworks/7 gnome/mkenums/enums.h.in
test cases/frameworks/7 gnome/mkenums/enums2.c.in
@@ -2767,6 +2773,8 @@
test cases/unit/73 wrap file url/subprojects/foo.tar.xz
test cases/unit/74 dep files/foo.c
test cases/unit/74 dep files/meson.build
+test cases/unit/75 subdir libdir/meson.build
+test cases/unit/75 subdir libdir/subprojects/flub/meson.build
test cases/unit/8 -L -l order/first.pc
test cases/unit/8 -L -l order/meson.build
test cases/unit/8 -L -l order/prog.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/backend/backends.py new/meson-0.54.2/mesonbuild/backend/backends.py
--- old/meson-0.54.1/mesonbuild/backend/backends.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/backend/backends.py 2020-05-15 09:23:18.000000000 +0200
@@ -734,7 +734,7 @@
# E.g. an external verifier or simulator program run on a generated executable.
# Can always be run without a wrapper.
test_for_machine = MachineChoice.BUILD
- is_cross = not self.environment.machines.matches_build_machine(test_for_machine)
+ is_cross = self.environment.is_cross_build(test_for_machine)
if is_cross and self.environment.need_exe_wrapper():
exe_wrapper = self.environment.get_exe_wrapper()
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/build.py new/meson-0.54.2/mesonbuild/build.py
--- old/meson-0.54.1/mesonbuild/build.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/build.py 2020-05-15 09:23:18.000000000 +0200
@@ -482,6 +482,7 @@
self.link_targets = []
self.link_whole_targets = []
self.link_depends = []
+ self.added_deps = set()
self.name_prefix_set = False
self.name_suffix_set = False
self.filename = 'no_name'
@@ -714,7 +715,7 @@
File.from_source_file(environment.source_dir, self.subdir, s))
elif hasattr(s, 'get_outputs'):
self.link_depends.extend(
- [File.from_built_file(s.subdir, p) for p in s.get_outputs()])
+ [File.from_built_file(s.get_subdir(), p) for p in s.get_outputs()])
else:
raise InvalidArguments(
'Link_depends arguments must be strings, Files, '
@@ -1037,6 +1038,8 @@
def add_deps(self, deps):
deps = listify(deps)
for dep in unholder(deps):
+ if dep in self.added_deps:
+ continue
if isinstance(dep, dependencies.InternalDependency):
# Those parts that are internal.
self.process_sourcelist(dep.sources)
@@ -1075,6 +1078,7 @@
'either an external dependency (returned by find_library() or '
'dependency()) or an internal dependency (returned by '
'declare_dependency()).'.format(type(dep).__name__))
+ self.added_deps.add(dep)
def get_external_deps(self):
return self.external_deps
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/executor.py new/meson-0.54.2/mesonbuild/cmake/executor.py
--- old/meson-0.54.1/mesonbuild/cmake/executor.py 2020-04-26 11:07:10.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/executor.py 2020-05-15 09:23:18.000000000 +0200
@@ -132,7 +132,7 @@
msg += '\n\nOn Unix-like systems this is often caused by scripts that are not executable.'
mlog.warning(msg)
return None
- cmvers = re.sub(r'\s*(cmake|cmake3) version\s*', '', out.split('\n')[0]).strip()
+ cmvers = re.search(r'(cmake|cmake3)\s*version\s*([\d.]+)', out).group(2)
return cmvers
def set_exec_mode(self, print_cmout: T.Optional[bool] = None, always_capture_stderr: T.Optional[bool] = None) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/interpreter.py new/meson-0.54.2/mesonbuild/cmake/interpreter.py
--- old/meson-0.54.1/mesonbuild/cmake/interpreter.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/interpreter.py 2020-05-15 09:23:18.000000000 +0200
@@ -287,7 +287,17 @@
for j in self.compile_opts[i]:
m = ConverterTarget.std_regex.match(j)
if m:
- self.override_options += ['{}_std={}'.format(i, m.group(2))]
+ std = m.group(2)
+ supported = self._all_lang_stds(i)
+ if std not in supported:
+ mlog.warning(
+ 'Unknown {0}_std "{1}" -> Ignoring. Try setting the project-'
+ 'level {0}_std if build errors occur. Known '
+ '{0}_stds are: {2}'.format(i, std, ' '.join(supported)),
+ once=True
+ )
+ continue
+ self.override_options += ['{}_std={}'.format(i, std)]
elif j in ['-fPIC', '-fpic', '-fPIE', '-fpie']:
self.pie = True
elif j in blacklist_compiler_flags:
@@ -537,6 +547,13 @@
suffixes += [x for x in exts]
return suffixes
+ @lru_cache(maxsize=None)
+ def _all_lang_stds(self, lang: str) -> T.List[str]:
+ lang_std = self.env.coredata.compiler_options.build.get(lang + '_std', None)
+ if not lang_std:
+ return []
+ return lang_std.choices
+
def process_inter_target_dependencies(self):
# Move the dependencies from all transfer_dependencies_from to the target
to_process = list(self.depends)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/traceparser.py new/meson-0.54.2/mesonbuild/cmake/traceparser.py
--- old/meson-0.54.1/mesonbuild/cmake/traceparser.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/traceparser.py 2020-05-15 09:23:18.000000000 +0200
@@ -660,25 +660,40 @@
fixed_list = [] # type: T.List[str]
curr_str = None # type: T.Optional[str]
+ path_found = False # type: bool
for i in broken_list:
if curr_str is None:
curr_str = i
+ path_found = False
elif os.path.isfile(curr_str):
# Abort concatenation if curr_str is an existing file
fixed_list += [curr_str]
curr_str = i
+ path_found = False
elif not reg_start.match(curr_str):
# Abort concatenation if curr_str no longer matches the regex
fixed_list += [curr_str]
curr_str = i
- elif reg_end.match(i) or os.path.exists('{} {}'.format(curr_str, i)):
+ path_found = False
+ elif reg_end.match(i):
# File detected
curr_str = '{} {}'.format(curr_str, i)
fixed_list += [curr_str]
curr_str = None
+ path_found = False
+ elif os.path.exists('{} {}'.format(curr_str, i)):
+ # Path detected
+ curr_str = '{} {}'.format(curr_str, i)
+ path_found = True
+ elif path_found:
+ # Add path to fixed_list after ensuring the whole path is in curr_str
+ fixed_list += [curr_str]
+ curr_str = i
+ path_found = False
else:
curr_str = '{} {}'.format(curr_str, i)
+ path_found = False
if curr_str:
fixed_list += [curr_str]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/compilers.py new/meson-0.54.2/mesonbuild/compilers/compilers.py
--- old/meson-0.54.1/mesonbuild/compilers/compilers.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/compilers.py 2020-05-15 09:23:18.000000000 +0200
@@ -1131,7 +1131,7 @@
def remove_linkerlike_args(self, args):
rm_exact = ('-headerpad_max_install_names',)
rm_prefixes = ('-Wl,', '-L',)
- rm_next = ('-L',)
+ rm_next = ('-L', '-framework',)
ret = []
iargs = iter(args)
for arg in iargs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/fortran.py new/meson-0.54.2/mesonbuild/compilers/fortran.py
--- old/meson-0.54.1/mesonbuild/compilers/fortran.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/fortran.py 2020-05-15 09:23:18.000000000 +0200
@@ -208,6 +208,18 @@
def language_stdlib_only_link_flags(self):
return ['-lgfortran', '-lm']
+ def has_header(self, hname, prefix, env, *, extra_args=None, dependencies=None, disable_cache=False):
+ '''
+ Derived from mixins/clike.py:has_header, but without C-style usage of
+ __has_include which breaks with GCC-Fortran 10:
+ https://github.com/mesonbuild/meson/issues/7017
+ '''
+ fargs = {'prefix': prefix, 'header': hname}
+ code = '{prefix}\n#include <{header}>'
+ return self.compiles(code.format(**fargs), env, extra_args=extra_args,
+ dependencies=dependencies, mode='preprocess', disable_cache=disable_cache)
+
+
class ElbrusFortranCompiler(GnuFortranCompiler, ElbrusCompiler):
def __init__(self, exelist, version, for_machine: MachineChoice,
is_cross, info: 'MachineInfo', exe_wrapper=None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/mixins/clike.py new/meson-0.54.2/mesonbuild/compilers/mixins/clike.py
--- old/meson-0.54.1/mesonbuild/compilers/mixins/clike.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/mixins/clike.py 2020-05-15 09:23:18.000000000 +0200
@@ -369,7 +369,8 @@
dependencies=dependencies, mode='link', disable_cache=disable_cache)
def run(self, code: str, env, *, extra_args=None, dependencies=None):
- if self.is_cross and self.exe_wrapper is None:
+ need_exe_wrapper = env.need_exe_wrapper(self.for_machine)
+ if need_exe_wrapper and self.exe_wrapper is None:
raise compilers.CrossNoRunException('Can not run test applications in this cross environment.')
with self._build_wrapper(code, env, extra_args, dependencies, mode='link', want_output=True) as p:
if p.returncode != 0:
@@ -377,7 +378,7 @@
p.input_name,
p.returncode))
return compilers.RunResult(False)
- if self.is_cross:
+ if need_exe_wrapper:
cmdlist = self.exe_wrapper + [p.output_name]
else:
cmdlist = p.output_name
@@ -658,7 +659,7 @@
# is not run so we don't care what the return value is.
main = '''\nint main(void) {{
void *a = (void*) &{func};
- long b = (long) a;
+ long long b = (long long) a;
return (int) b;
}}'''
return head, main
@@ -727,23 +728,29 @@
# need to look for them differently. On nice compilers like clang, we
# can just directly use the __has_builtin() macro.
fargs['no_includes'] = '#include' not in prefix
+ is_builtin = funcname.startswith('__builtin_')
+ fargs['is_builtin'] = is_builtin
+ fargs['__builtin_'] = '' if is_builtin else '__builtin_'
t = '''{prefix}
int main(void) {{
+
+ /* With some toolchains (MSYS2/mingw for example) the compiler
+ * provides various builtins which are not really implemented and
+ * fall back to the stdlib where they aren't provided and fail at
+ * build/link time. In case the user provides a header, including
+ * the header didn't lead to the function being defined, and the
+ * function we are checking isn't a builtin itself we assume the
+ * builtin is not functional and we just error out. */
+ #if !{no_includes:d} && !defined({func}) && !{is_builtin:d}
+ #error "No definition for {__builtin_}{func} found in the prefix"
+ #endif
+
#ifdef __has_builtin
- #if !__has_builtin(__builtin_{func})
- #error "__builtin_{func} not found"
+ #if !__has_builtin({__builtin_}{func})
+ #error "{__builtin_}{func} not found"
#endif
#elif ! defined({func})
- /* Check for __builtin_{func} only if no includes were added to the
- * prefix above, which means no definition of {func} can be found.
- * We would always check for this, but we get false positives on
- * MSYS2 if we do. Their toolchain is broken, but we can at least
- * give them a workaround. */
- #if {no_includes:d}
- __builtin_{func};
- #else
- #error "No definition for __builtin_{func} found in the prefix"
- #endif
+ {__builtin_}{func};
#endif
return 0;
}}'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/coredata.py new/meson-0.54.2/mesonbuild/coredata.py
--- old/meson-0.54.1/mesonbuild/coredata.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/coredata.py 2020-05-15 09:23:18.000000000 +0200
@@ -38,7 +38,7 @@
OptionDictType = T.Dict[str, 'UserOption[T.Any]']
-version = '0.54.1'
+version = '0.54.2'
backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'vs2019', 'xcode']
default_yielding = False
@@ -381,6 +381,7 @@
self.compiler_check_cache = OrderedDict()
# Only to print a warning if it changes between Meson invocations.
self.config_files = self.__load_config_files(options, scratch_dir, 'native')
+ self.builtin_options_libdir_cross_fixup()
self.init_builtins('')
@staticmethod
@@ -441,12 +442,12 @@
raise MesonException('Cannot find specified {} file: {}'.format(ftype, f))
return real
- def libdir_cross_fixup(self):
+ def builtin_options_libdir_cross_fixup(self):
# By default set libdir to "lib" when cross compiling since
# getting the "system default" is always wrong on multiarch
# platforms as it gets a value like lib/x86_64-linux-gnu.
if self.cross_files:
- self.builtins['libdir'].value = 'lib'
+ builtin_options['libdir'].default = 'lib'
def sanitize_prefix(self, prefix):
prefix = os.path.expanduser(prefix)
@@ -507,7 +508,6 @@
for for_machine in iter(MachineChoice):
for key, opt in builtin_options_per_machine.items():
self.add_builtin_option(self.builtins_per_machine[for_machine], key, opt, subproject)
- self.libdir_cross_fixup()
def add_builtin_option(self, opts_map, key, opt, subproject):
if subproject:
@@ -665,7 +665,9 @@
if type(oldval) != type(value):
self.user_options[name] = value
- def is_cross_build(self) -> bool:
+ def is_cross_build(self, when_building_for: MachineChoice = MachineChoice.HOST) -> bool:
+ if when_building_for == MachineChoice.BUILD:
+ return False
return len(self.cross_files) > 0
def strip_build_option_names(self, options):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/dependencies/boost.py new/meson-0.54.2/mesonbuild/dependencies/boost.py
--- old/meson-0.54.1/mesonbuild/dependencies/boost.py 2020-04-12 23:07:59.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/dependencies/boost.py 2020-05-15 09:23:18.000000000 +0200
@@ -344,6 +344,7 @@
self.multithreading = kwargs.get('threading', 'multi') == 'multi'
self.boost_root = None
+ self.explicit_static = 'static' in kwargs
# Extract and validate modules
self.modules = mesonlib.extract_as_list(kwargs, 'modules') # type: T.List[str]
@@ -411,10 +412,19 @@
break
def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -> bool:
+ mlog.debug(' - potential library dirs: {}'.format([x.as_posix() for x in lib_dirs]))
+ mlog.debug(' - potential include dirs: {}'.format([x.path.as_posix() for x in inc_dirs]))
+
# 2. Find all boost libraries
libs = [] # type: T.List[BoostLibraryFile]
for i in lib_dirs:
- libs += self.detect_libraries(i)
+ libs = self.detect_libraries(i)
+ if libs:
+ mlog.debug(' - found boost library dir: {}'.format(i))
+ # mlog.debug(' - raw library list:')
+ # for j in libs:
+ # mlog.debug(' - {}'.format(j))
+ break
libs = sorted(set(libs))
modules = ['boost_' + x for x in self.modules]
@@ -422,9 +432,6 @@
mlog.debug(' - found boost {} include dir: {}'.format(inc.version, inc.path))
f_libs = self.filter_libraries(libs, inc.version_lib)
- # mlog.debug(' - raw library list:')
- # for j in libs:
- # mlog.debug(' - {}'.format(j))
mlog.debug(' - filtered library list:')
for j in f_libs:
mlog.debug(' - {}'.format(j))
@@ -499,6 +506,19 @@
return [self._include_dir_from_version_header(x) for x in candidates]
def detect_lib_dirs(self, root: Path) -> T.List[Path]:
+ # First check the system include paths. Only consider those within the
+ # given root path
+ system_dirs_t = self.clib_compiler.get_library_dirs(self.env)
+ system_dirs = [Path(x) for x in system_dirs_t]
+ system_dirs = [x.resolve() for x in system_dirs if x.exists()]
+ system_dirs = [x for x in system_dirs if mesonlib.path_is_in_root(x, root)]
+ system_dirs = list(mesonlib.OrderedSet(system_dirs))
+
+ if system_dirs:
+ return system_dirs
+
+ # No system include paths were found --> fall back to manually looking
+ # for library dirs in root
dirs = [] # type: T.List[Path]
subdirs = [] # type: T.List[Path]
for i in root.iterdir():
@@ -510,7 +530,25 @@
for j in i.iterdir():
if j.is_dir() and j.name.endswith('-linux-gnu'):
subdirs += [j]
- return dirs + subdirs
+
+ # Filter out paths that don't match the target arch to avoid finding
+ # the wrong libraries. See https://github.com/mesonbuild/meson/issues/7110
+ if not self.arch:
+ return dirs + subdirs
+
+ arch_list_32 = ['32', 'i386']
+ arch_list_64 = ['64']
+
+ raw_list = dirs + subdirs
+ no_arch = [x for x in raw_list if not any([y in x.name for y in arch_list_32 + arch_list_64])]
+
+ matching_arch = [] # type: T.List[Path]
+ if '32' in self.arch:
+ matching_arch = [x for x in raw_list if any([y in x.name for y in arch_list_32])]
+ elif '64' in self.arch:
+ matching_arch = [x for x in raw_list if any([y in x.name for y in arch_list_64])]
+
+ return sorted(matching_arch) + sorted(no_arch)
def filter_libraries(self, libs: T.List[BoostLibraryFile], lib_vers: str) -> T.List[BoostLibraryFile]:
# MSVC is very picky with the library tags
@@ -522,7 +560,7 @@
except (KeyError, IndexError, AttributeError):
pass
- libs = [x for x in libs if x.static == self.static]
+ libs = [x for x in libs if x.static == self.static or not self.explicit_static]
libs = [x for x in libs if x.mt == self.multithreading]
libs = [x for x in libs if x.version_matches(lib_vers)]
libs = [x for x in libs if x.arch_matches(self.arch)]
@@ -567,6 +605,12 @@
roots += paths
return roots # Do not add system paths if BOOST_ROOT is present
+ # Add roots from system paths
+ inc_paths = [Path(x) for x in self.clib_compiler.get_default_include_dirs()]
+ inc_paths = [x.parent for x in inc_paths if x.exists()]
+ inc_paths = [x.resolve() for x in inc_paths]
+ roots += inc_paths
+
# Add system paths
if self.env.machines[self.for_machine].is_windows():
# Where boost built from source actually installs it
@@ -588,8 +632,6 @@
roots += [x for x in candidates if x.name.lower().startswith('boost') and x.is_dir()]
else:
tmp = [] # type: T.List[Path]
- # Add unix paths
- tmp += [Path(x).parent for x in self.clib_compiler.get_default_include_dirs()]
# Homebrew
brew_boost = Path('/usr/local/Cellar/boost')
@@ -637,11 +679,8 @@
return BoostIncludeDir(hfile.parents[1], int(m.group(1)))
def _extra_compile_args(self) -> T.List[str]:
- args = [] # type: T.List[str]
- args += ['-DBOOST_ALL_NO_LIB'] # Disable automatic linking
- if not self.static:
- args += ['-DBOOST_ALL_DYN_LINK']
- return args
+ # BOOST_ALL_DYN_LINK should not be required with the known defines below
+ return ['-DBOOST_ALL_NO_LIB'] # Disable automatic linking
# See https://www.boost.org/doc/libs/1_72_0/more/getting_started/unix-variants.ht…
@@ -665,9 +704,9 @@
#### ---- BEGIN GENERATED ---- ####
# #
# Generated with tools/boost_names.py:
-# - boost version: 1.72.0
-# - modules found: 158
-# - libraries found: 42
+# - boost version: 1.73.0
+# - modules found: 159
+# - libraries found: 43
#
class BoostLibrary():
@@ -690,16 +729,16 @@
boost_libraries = {
'boost_atomic': BoostLibrary(
name='boost_atomic',
- shared=[],
- static=[],
+ shared=['-DBOOST_ATOMIC_DYN_LINK=1'],
+ static=['-DBOOST_ATOMIC_STATIC_LINK=1'],
single=[],
multi=[],
),
'boost_chrono': BoostLibrary(
name='boost_chrono',
- shared=['-DBOOST_ALL_DYN_LINK=1'],
- static=['-DBOOST_All_STATIC_LINK=1'],
- single=[],
+ shared=['-DBOOST_CHRONO_DYN_LINK=1'],
+ static=['-DBOOST_CHRONO_STATIC_LINK=1'],
+ single=['-DBOOST_CHRONO_THREAD_DISABLED'],
multi=[],
),
'boost_container': BoostLibrary(
@@ -711,28 +750,28 @@
),
'boost_context': BoostLibrary(
name='boost_context',
- shared=[],
+ shared=['-DBOOST_CONTEXT_DYN_LINK=1'],
static=[],
single=[],
multi=[],
),
'boost_contract': BoostLibrary(
name='boost_contract',
- shared=[],
- static=[],
- single=[],
+ shared=['-DBOOST_CONTRACT_DYN_LINK'],
+ static=['-DBOOST_CONTRACT_STATIC_LINK'],
+ single=['-DBOOST_CONTRACT_DISABLE_THREADS'],
multi=[],
),
'boost_coroutine': BoostLibrary(
name='boost_coroutine',
- shared=[],
+ shared=['-DBOOST_COROUTINES_DYN_LINK=1'],
static=[],
single=[],
multi=[],
),
'boost_date_time': BoostLibrary(
name='boost_date_time',
- shared=[],
+ shared=['-DBOOST_DATE_TIME_DYN_LINK=1'],
static=[],
single=[],
multi=[],
@@ -746,14 +785,14 @@
),
'boost_fiber': BoostLibrary(
name='boost_fiber',
- shared=[],
+ shared=['-DBOOST_FIBERS_DYN_LINK=1'],
static=[],
single=[],
multi=[],
),
'boost_fiber_numa': BoostLibrary(
name='boost_fiber_numa',
- shared=[],
+ shared=['-DBOOST_FIBERS_DYN_LINK=1'],
static=[],
single=[],
multi=[],
@@ -767,84 +806,91 @@
),
'boost_graph': BoostLibrary(
name='boost_graph',
- shared=['-DBOOST_GRAPH_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_iostreams': BoostLibrary(
name='boost_iostreams',
- shared=['-DBOOST_IOSTREAMS_DYN_LINK=1', '-DBOOST_IOSTREAMS_DYN_LINK=1'],
+ shared=['-DBOOST_IOSTREAMS_DYN_LINK=1'],
static=[],
single=[],
multi=[],
),
'boost_locale': BoostLibrary(
name='boost_locale',
- shared=['-DBOOST_LOCALE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_log': BoostLibrary(
name='boost_log',
- shared=['-DBOOST_LOG_DLL', '-DBOOST_LOG_DYN_LINK=1'],
+ shared=['-DBOOST_LOG_DYN_LINK=1'],
static=[],
- single=['BOOST_LOG_NO_THREADS'],
+ single=['-DBOOST_LOG_NO_THREADS'],
multi=[],
),
'boost_log_setup': BoostLibrary(
name='boost_log_setup',
- shared=['-DBOOST_LOG_DYN_LINK=1', '-DBOOST_LOG_SETUP_DLL', '-DBOOST_LOG_SETUP_DYN_LINK=1'],
+ shared=['-DBOOST_LOG_SETUP_DYN_LINK=1'],
static=[],
- single=['BOOST_LOG_NO_THREADS'],
+ single=['-DBOOST_LOG_NO_THREADS'],
multi=[],
),
'boost_math_c99': BoostLibrary(
name='boost_math_c99',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_math_c99f': BoostLibrary(
name='boost_math_c99f',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_math_c99l': BoostLibrary(
name='boost_math_c99l',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_math_tr1': BoostLibrary(
name='boost_math_tr1',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_math_tr1f': BoostLibrary(
name='boost_math_tr1f',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_math_tr1l': BoostLibrary(
name='boost_math_tr1l',
- shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_mpi': BoostLibrary(
name='boost_mpi',
- shared=['-DBOOST_MPI_DYN_LINK=1'],
+ shared=[],
+ static=[],
+ single=[],
+ multi=[],
+ ),
+ 'boost_nowide': BoostLibrary(
+ name='boost_nowide',
+ shared=['-DBOOST_NOWIDE_DYN_LINK=1'],
static=[],
single=[],
multi=[],
@@ -865,63 +911,63 @@
),
'boost_random': BoostLibrary(
name='boost_random',
- shared=[],
+ shared=['-DBOOST_RANDOM_DYN_LINK'],
static=[],
single=[],
multi=[],
),
'boost_regex': BoostLibrary(
name='boost_regex',
- shared=['-DBOOST_REGEX_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_serialization': BoostLibrary(
name='boost_serialization',
- shared=['-DBOOST_SERIALIZATION_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_addr2line': BoostLibrary(
name='boost_stacktrace_addr2line',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_backtrace': BoostLibrary(
name='boost_stacktrace_backtrace',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_basic': BoostLibrary(
name='boost_stacktrace_basic',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_noop': BoostLibrary(
name='boost_stacktrace_noop',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_windbg': BoostLibrary(
name='boost_stacktrace_windbg',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
),
'boost_stacktrace_windbg_cached': BoostLibrary(
name='boost_stacktrace_windbg_cached',
- shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
@@ -942,8 +988,8 @@
),
'boost_thread': BoostLibrary(
name='boost_thread',
- shared=['-DBOOST_THREAD_USE_DLL=1'],
- static=['-DBOOST_THREAD_USE_LIB=1'],
+ shared=['-DBOOST_THREAD_BUILD_DLL=1', '-DBOOST_THREAD_USE_DLL=1'],
+ static=['-DBOOST_THREAD_BUILD_LIB=1', '-DBOOST_THREAD_USE_LIB=1'],
single=[],
multi=[],
),
@@ -956,7 +1002,7 @@
),
'boost_type_erasure': BoostLibrary(
name='boost_type_erasure',
- shared=[],
+ shared=['-DBOOST_TYPE_ERASURE_DYN_LINK'],
static=[],
single=[],
multi=[],
@@ -977,7 +1023,7 @@
),
'boost_wserialization': BoostLibrary(
name='boost_wserialization',
- shared=['-DBOOST_SERIALIZATION_DYN_LINK=1'],
+ shared=[],
static=[],
single=[],
multi=[],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/dependencies/ui.py new/meson-0.54.2/mesonbuild/dependencies/ui.py
--- old/meson-0.54.1/mesonbuild/dependencies/ui.py 2020-04-12 23:07:59.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/dependencies/ui.py 2020-05-15 09:23:18.000000000 +0200
@@ -406,6 +406,9 @@
if libfile:
libfile = libfile[0]
else:
+ mlog.log("Could not find:", module,
+ self.qtpkgname + module + modules_lib_suffix,
+ 'in', libdir)
self.is_found = False
break
self.link_args.append(libfile)
@@ -426,6 +429,20 @@
if self.env.machines[self.for_machine].is_darwin():
if is_debug:
suffix += '_debug'
+ if mesonlib.version_compare(self.version, '>= 5.14.0'):
+ if self.env.machines[self.for_machine].is_android():
+ cpu_family = self.env.machines[self.for_machine].cpu_family
+ if cpu_family == 'x86':
+ suffix += '_x86'
+ elif cpu_family == 'x86_64':
+ suffix += '_x86_64'
+ elif cpu_family == 'arm':
+ suffix += '_armeabi-v7a'
+ elif cpu_family == 'aarch64':
+ suffix += '_arm64-v8a'
+ else:
+ mlog.warning('Android target arch {!r} for Qt5 is unknown, '
+ 'module detection may not work'.format(cpu_family))
return suffix
def _link_with_qtmain(self, is_debug, libdir):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/envconfig.py new/meson-0.54.2/mesonbuild/envconfig.py
--- old/meson-0.54.1/mesonbuild/envconfig.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/envconfig.py 2020-05-15 09:23:18.000000000 +0200
@@ -40,6 +40,7 @@
'alpha',
'arc',
'arm',
+ 'avr',
'c2000',
'e2k',
'ia64',
@@ -121,7 +122,7 @@
# ones.
([var_name + '_FOR_BUILD'] if is_cross else [var_name]),
# Always just the unprefixed host verions
- ([] if is_cross else [var_name]),
+ [var_name]
)[for_machine]
for var in candidates:
value = os.environ.get(var)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/environment.py new/meson-0.54.2/mesonbuild/environment.py
--- old/meson-0.54.1/mesonbuild/environment.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/environment.py 2020-05-15 09:23:18.000000000 +0200
@@ -637,8 +637,8 @@
self.coredata.meson_command = mesonlib.meson_command
self.first_invocation = True
- def is_cross_build(self) -> bool:
- return self.coredata.is_cross_build()
+ def is_cross_build(self, when_building_for: MachineChoice = MachineChoice.HOST) -> bool:
+ return self.coredata.is_cross_build(when_building_for)
def dump_coredata(self):
return coredata.save(self.coredata, self.get_build_dir())
@@ -901,7 +901,7 @@
def _detect_c_or_cpp_compiler(self, lang: str, for_machine: MachineChoice) -> Compiler:
popen_exceptions = {}
compilers, ccache, exe_wrap = self._get_compilers(lang, for_machine)
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
for compiler in compilers:
@@ -1151,7 +1151,7 @@
def detect_cuda_compiler(self, for_machine):
popen_exceptions = {}
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
compilers, ccache, exe_wrap = self._get_compilers('cuda', for_machine)
info = self.machines[for_machine]
for compiler in compilers:
@@ -1191,7 +1191,7 @@
def detect_fortran_compiler(self, for_machine: MachineChoice):
popen_exceptions = {}
compilers, ccache, exe_wrap = self._get_compilers('fortran', for_machine)
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
for compiler in compilers:
if isinstance(compiler, str):
@@ -1310,7 +1310,7 @@
def _detect_objc_or_objcpp_compiler(self, for_machine: MachineInfo, objc: bool) -> 'Compiler':
popen_exceptions = {}
compilers, ccache, exe_wrap = self._get_compilers('objc' if objc else 'objcpp', for_machine)
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
for compiler in compilers:
@@ -1401,7 +1401,7 @@
def detect_vala_compiler(self, for_machine):
exelist = self.lookup_binary_entry(for_machine, 'vala')
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
if exelist is None:
# TODO support fallback
@@ -1421,7 +1421,7 @@
def detect_rust_compiler(self, for_machine):
popen_exceptions = {}
compilers, ccache, exe_wrap = self._get_compilers('rust', for_machine)
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
cc = self.detect_c_compiler(for_machine)
@@ -1512,7 +1512,7 @@
arch = 'x86_mscoff'
popen_exceptions = {}
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
results, ccache, exe_wrap = self._get_compilers('d', for_machine)
for exelist in results:
# Search for a D compiler.
@@ -1603,7 +1603,7 @@
def detect_swift_compiler(self, for_machine):
exelist = self.lookup_binary_entry(for_machine, 'swift')
- is_cross = not self.machines.matches_build_machine(for_machine)
+ is_cross = self.is_cross_build(for_machine)
info = self.machines[for_machine]
if exelist is None:
# TODO support fallback
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/interpreterbase.py new/meson-0.54.2/mesonbuild/interpreterbase.py
--- old/meson-0.54.1/mesonbuild/interpreterbase.py 2020-03-23 18:22:09.000000000 +0100
+++ new/meson-0.54.2/mesonbuild/interpreterbase.py 2020-05-15 09:23:18.000000000 +0200
@@ -18,6 +18,7 @@
from . import mparser, mesonlib, mlog
from . import environment, dependencies
+import abc
import os, copy, re
import collections.abc
from functools import wraps
@@ -212,12 +213,11 @@
return f(*wrapped_args, **wrapped_kwargs)
return wrapped
-class FeatureCheckBase:
+class FeatureCheckBase(metaclass=abc.ABCMeta):
"Base class for feature version checks"
- # Class variable, shared across all instances
- #
- # Format: {subproject: {feature_version: set(feature_names)}}
+ # In python 3.6 we can just forward declare this, but in 3.5 we can't
+ # This will be overwritten by the subclasses by necessity
feature_registry = {} # type: T.ClassVar[T.Dict[str, T.Dict[str, T.Set[str]]]]
def __init__(self, feature_name: str, version: str):
@@ -231,13 +231,18 @@
return ''
return mesonlib.project_meson_versions[subproject]
+ @staticmethod
+ @abc.abstractmethod
+ def check_version(target_version: str, feature_Version: str) -> bool:
+ pass
+
def use(self, subproject: str) -> None:
tv = self.get_target_version(subproject)
# No target version
if tv == '':
return
# Target version is new enough
- if mesonlib.version_compare_condition_with_min(tv, self.feature_version):
+ if self.check_version(tv, self.feature_version):
return
# Feature is too new for target version, register it
if subproject not in self.feature_registry:
@@ -283,6 +288,15 @@
class FeatureNew(FeatureCheckBase):
"""Checks for new features"""
+ # Class variable, shared across all instances
+ #
+ # Format: {subproject: {feature_version: set(feature_names)}}
+ feature_registry = {} # type: T.ClassVar[T.Dict[str, T.Dict[str, T.Set[str]]]]
+
+ @staticmethod
+ def check_version(target_version: str, feature_version: str) -> bool:
+ return mesonlib.version_compare_condition_with_min(target_version, feature_version)
+
@staticmethod
def get_warning_str_prefix(tv: str) -> str:
return 'Project specifies a minimum meson_version \'{}\' but uses features which were added in newer versions:'.format(tv)
@@ -294,6 +308,16 @@
class FeatureDeprecated(FeatureCheckBase):
"""Checks for deprecated features"""
+ # Class variable, shared across all instances
+ #
+ # Format: {subproject: {feature_version: set(feature_names)}}
+ feature_registry = {} # type: T.ClassVar[T.Dict[str, T.Dict[str, T.Set[str]]]]
+
+ @staticmethod
+ def check_version(target_version: str, feature_version: str) -> bool:
+ # For deprecatoin checks we need to return the inverse of FeatureNew checks
+ return not mesonlib.version_compare_condition_with_min(target_version, feature_version)
+
@staticmethod
def get_warning_str_prefix(tv: str) -> str:
return 'Deprecated features used:'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/linkers.py new/meson-0.54.2/mesonbuild/linkers.py
--- old/meson-0.54.1/mesonbuild/linkers.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/linkers.py 2020-05-15 09:23:18.000000000 +0200
@@ -761,6 +761,11 @@
def get_asneeded_args(self) -> T.List[str]:
return []
+ def build_rpath_args(self, env: 'Environment', build_dir: str, from_dir: str,
+ rpath_paths: str, build_rpath: str,
+ install_rpath: str) -> T.List[str]:
+ return []
+
class CcrxDynamicLinker(DynamicLinker):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/mesonlib.py new/meson-0.54.2/mesonbuild/mesonlib.py
--- old/meson-0.54.1/mesonbuild/mesonlib.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/mesonlib.py 2020-05-15 09:23:18.000000000 +0200
@@ -1529,6 +1529,16 @@
except (TypeError, ValueError):
return path
+def path_is_in_root(path: Path, root: Path, resolve: bool = False) -> bool:
+ # Check wheter a path is within the root directory root
+ try:
+ if resolve:
+ path.resolve().relative_to(root.resolve())
+ else:
+ path.relative_to(root)
+ except ValueError:
+ return False
+ return True
class LibType(Enum):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/modules/gnome.py new/meson-0.54.2/mesonbuild/modules/gnome.py
--- old/meson-0.54.1/mesonbuild/modules/gnome.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/modules/gnome.py 2020-05-15 09:23:18.000000000 +0200
@@ -685,11 +685,10 @@
source.get_subdir())
if subdir not in typelib_includes:
typelib_includes.append(subdir)
- elif isinstance(dep, PkgConfigDependency):
- girdir = dep.get_pkgconfig_variable("girdir", {'default': ''})
+ if isinstance(dep, Dependency):
+ girdir = dep.get_variable(pkgconfig='girdir', internal='girdir', default_value='')
if girdir and girdir not in typelib_includes:
typelib_includes.append(girdir)
-
return typelib_includes
def _get_external_args_for_langs(self, state, langs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/mesonbuild/templates/mesontemplates.py new/meson-0.54.2/mesonbuild/templates/mesontemplates.py
--- old/meson-0.54.1/mesonbuild/templates/mesontemplates.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/templates/mesontemplates.py 2020-05-15 09:23:18.000000000 +0200
@@ -27,8 +27,8 @@
default_options : [{default_options}])
jar('{executable}',
- {sourcespec},{depspec},
- main_class: {main_class},
+ {sourcespec},{depspec}
+ main_class: '{main_class}',
install : true)
'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/run_unittests.py new/meson-0.54.2/run_unittests.py
--- old/meson-0.54.1/run_unittests.py 2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/run_unittests.py 2020-05-15 09:23:18.000000000 +0200
@@ -1442,14 +1442,14 @@
class BasePlatformTests(unittest.TestCase):
+ prefix = '/usr'
+ libdir = 'lib'
def setUp(self):
super().setUp()
self.maxDiff = None
src_root = os.path.dirname(__file__)
src_root = os.path.join(os.getcwd(), src_root)
self.src_root = src_root
- self.prefix = '/usr'
- self.libdir = 'lib'
# Get the backend
# FIXME: Extract this from argv?
self.backend = getattr(Backend, os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja'))
@@ -1562,8 +1562,9 @@
extra_args = [extra_args]
args = [srcdir, self.builddir]
if default_args:
- args += ['--prefix', self.prefix,
- '--libdir', self.libdir]
+ args += ['--prefix', self.prefix]
+ if self.libdir:
+ args += ['--libdir', self.libdir]
if self.meson_native_file:
args += ['--native-file', self.meson_native_file]
if self.meson_cross_file:
@@ -5256,7 +5257,7 @@
def test_removing_unused_linker_args(self):
testdir = os.path.join(self.common_test_dir, '108 has arg')
- env = {'CFLAGS': '-L/tmp -L /var/tmp -headerpad_max_install_names -Wl,-export_dynamic'}
+ env = {'CFLAGS': '-L/tmp -L /var/tmp -headerpad_max_install_names -Wl,-export_dynamic -framework Foundation'}
self.init(testdir, override_envvars=env)
@@ -6564,11 +6565,17 @@
os.unlink(wrap_filename)
+class BaseLinuxCrossTests(BasePlatformTests):
+ # Don't pass --libdir when cross-compiling. We have tests that
+ # check whether meson auto-detects it correctly.
+ libdir = None
+
+
def should_run_cross_arm_tests():
return shutil.which('arm-linux-gnueabihf-gcc') and not platform.machine().lower().startswith('arm')
@unittest.skipUnless(not is_windows() and should_run_cross_arm_tests(), "requires ability to cross compile to ARM")
-class LinuxCrossArmTests(BasePlatformTests):
+class LinuxCrossArmTests(BaseLinuxCrossTests):
'''
Tests that cross-compilation to Linux/ARM works
'''
@@ -6615,6 +6622,17 @@
return
self.assertTrue(False, 'Option libdir not in introspect data.')
+ def test_cross_libdir_subproject(self):
+ # Guard against a regression where calling "subproject"
+ # would reset the value of libdir to its default value.
+ testdir = os.path.join(self.unit_test_dir, '75 subdir libdir')
+ self.init(testdir, extra_args=['--libdir=fuf'])
+ for i in self.introspect('--buildoptions'):
+ if i['name'] == 'libdir':
+ self.assertEqual(i['value'], 'fuf')
+ return
+ self.assertTrue(False, 'Libdir specified on command line gets reset.')
+
def test_std_remains(self):
# C_std defined in project options must be in effect also when cross compiling.
testdir = os.path.join(self.unit_test_dir, '51 noncross options')
@@ -6638,7 +6656,7 @@
return shutil.which('x86_64-w64-mingw32-gcc') and not (is_windows() or is_cygwin())
@unittest.skipUnless(not is_windows() and should_run_cross_mingw_tests(), "requires ability to cross compile with MinGW")
-class LinuxCrossMingwTests(BasePlatformTests):
+class LinuxCrossMingwTests(BaseLinuxCrossTests):
'''
Tests that cross-compilation to Windows/MinGW works
'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/foo.c" "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/foo.c"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/foo.c" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/foo.c" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int main(void) {
+ const char *fn = DEPFILE;
+ FILE *f = fopen(fn, "r");
+ if (!f) {
+ printf("could not open %s", fn);
+ return 1;
+ }
+ else {
+ printf("successfully opened %s", fn);
+ }
+
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/make_file.py" "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/make_file.py"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/make_file.py" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/make_file.py" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+import sys
+
+with open(sys.argv[1], 'w') as f:
+ print('# this file does nothing', file=f)
+
+with open(sys.argv[2], 'w') as f:
+ print('# this file does nothing', file=f)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/meson.build" "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/meson.build"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom target/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom target/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,19 @@
+project('link_depends_indexed_custom_target', 'c')
+
+if meson.backend().startswith('vs')
+ # FIXME: Broken on the VS backends
+ error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799')
+endif
+
+cmd = find_program('make_file.py')
+
+dep_files = custom_target('gen_dep',
+ command: [cmd, '@OUTPUT@'],
+ output: ['dep_file1', 'dep_file2'])
+
+exe = executable('foo', 'foo.c',
+ link_depends: dep_files[1],
+ c_args: ['-DDEPFILE="' + dep_files[0].full_path()+ '"'])
+
+# check that dep_file1 exists, which means that link_depends target ran
+test('runtest', exe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/common/39 has function/meson.build" "new/meson-0.54.2/test cases/common/39 has function/meson.build"
--- "old/meson-0.54.1/test cases/common/39 has function/meson.build" 2020-04-26 11:07:17.000000000 +0200
+++ "new/meson-0.54.2/test cases/common/39 has function/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -88,4 +88,12 @@
assert (cc.has_function('sendmmsg', args : unit_test_args),
'Failed to detect function "sendmmsg" (should always exist).')
endif
+
+ # We should be able to find GCC and Clang __builtin functions
+ if ['gcc', 'clang'].contains(cc.get_id())
+ # __builtin_constant_p is documented to exist at least as far back as
+ # GCC 2.95.3
+ assert(cc.has_function('__builtin_constant_p', args : unit_test_args),
+ '__builtin_constant_p must be found under gcc and clang')
+ endif
endforeach
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/1 boost/meson.build" "new/meson-0.54.2/test cases/frameworks/1 boost/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/1 boost/meson.build" 2020-04-26 11:07:17.000000000 +0200
+++ "new/meson-0.54.2/test cases/frameworks/1 boost/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -13,7 +13,7 @@
# within one project. The need to be independent of each other.
# Use one without a library dependency and one with it.
-linkdep = dependency('boost', static: s, modules : ['thread', 'system'])
+linkdep = dependency('boost', static: s, modules : ['thread', 'system', 'date_time'])
testdep = dependency('boost', static: s, modules : ['unit_test_framework'])
nomoddep = dependency('boost', static: s)
extralibdep = dependency('boost', static: s, modules : ['thread', 'system', 'date_time', 'log_setup', 'log', 'filesystem', 'regex'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c" "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,124 @@
+#include "dep3.h"
+
+struct _MesonDep3
+{
+ GObject parent_instance;
+
+ gchar *msg;
+};
+
+G_DEFINE_TYPE (MesonDep3, meson_dep3, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_MSG,
+ LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+/**
+ * meson_dep3_new:
+ * @msg: The message to set.
+ *
+ * Allocates a new #MesonDep3.
+ *
+ * Returns: (transfer full): a #MesonDep3.
+ */
+MesonDep3 *
+meson_dep3_new (const gchar *msg)
+{
+ g_return_val_if_fail (msg != NULL, NULL);
+
+ return g_object_new (MESON_TYPE_DEP3,
+ "message", msg,
+ NULL);
+}
+
+static void
+meson_dep3_finalize (GObject *object)
+{
+ MesonDep3 *self = (MesonDep3 *)object;
+
+ g_clear_pointer (&self->msg, g_free);
+
+ G_OBJECT_CLASS (meson_dep3_parent_class)->finalize (object);
+}
+
+static void
+meson_dep3_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep3 *self = MESON_DEP3 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ g_value_set_string (value, self->msg);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep3_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MesonDep3 *self = MESON_DEP3 (object);
+
+ switch (prop_id)
+ {
+ case PROP_MSG:
+ self->msg = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+meson_dep3_class_init (MesonDep3Class *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = meson_dep3_finalize;
+ object_class->get_property = meson_dep3_get_property;
+ object_class->set_property = meson_dep3_set_property;
+
+ gParamSpecs [PROP_MSG] =
+ g_param_spec_string ("message",
+ "Message",
+ "The message to print.",
+ NULL,
+ (G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+meson_dep3_init (MesonDep3 *self)
+{
+}
+
+/**
+ * meson_dep3_return_message:
+ * @self: a #MesonDep3.
+ *
+ * Returns the message.
+ *
+ * Returns: (transfer none): a const gchar*
+ */
+const gchar*
+meson_dep3_return_message (MesonDep3 *self)
+{
+ g_return_val_if_fail (MESON_IS_DEP3 (self), NULL);
+
+ return (const gchar*) self->msg;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h" "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef MESON_DEP3_H
+#define MESON_DEP3_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_DEP3 (meson_dep3_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonDep3, meson_dep3, MESON, DEP3, GObject)
+
+MesonDep3 *meson_dep3_new (const gchar *msg);
+const gchar *meson_dep3_return_message (MesonDep3 *self);
+
+G_END_DECLS
+
+#endif /* MESON_DEP3_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build" "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,22 @@
+dep3sources = ['dep3.c', 'dep3.h']
+
+dep3lib = shared_library(
+ 'dep3lib',
+ sources : dep3sources,
+ dependencies : gobj,
+ install : true
+)
+
+dep3gir = gnome.generate_gir(
+ dep3lib,
+ sources : dep3sources,
+ nsversion : '1.0',
+ namespace : 'MesonDep3',
+ symbol_prefix : 'meson',
+ identifier_prefix : 'Meson',
+ includes : ['GObject-2.0'],
+ install : true
+)
+
+dep3_dep = declare_dependency(link_with : dep3lib,
+ sources : [dep3gir])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/meson.build" "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/meson.build" 2018-08-25 10:05:43.000000000 +0200
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -1,4 +1,5 @@
subdir('dep2')
+subdir('dep3')
dep1sources = ['dep1.c', 'dep1.h']
@@ -20,11 +21,11 @@
symbol_prefix : 'meson',
identifier_prefix : 'Meson',
header: 'dep1.h',
- includes : ['GObject-2.0', 'MesonDep2-1.0'],
+ includes : ['GObject-2.0', 'MesonDep2-1.0', dep3gir[0]],
dependencies : [dep2_dep],
install : true
)
dep1_dep = declare_dependency(link_with : dep1lib,
- dependencies : [dep2_dep],
+ dependencies : [dep2_dep, dep3_dep],
sources : [dep1gir])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/meson.build" "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/meson.build" 2018-10-31 10:31:20.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -45,7 +45,7 @@
)
test('gobject introspection/c', girexe)
-gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir()])
+gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir(), dep3lib.outdir()])
envdata = environment()
envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':')
envdata.append('LD_LIBRARY_PATH', gir_paths)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 gnome/test.json" "new/meson-0.54.2/test cases/frameworks/7 gnome/test.json"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/test.json" 2020-03-23 18:22:09.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/test.json" 2020-05-15 09:23:18.000000000 +0200
@@ -13,12 +13,16 @@
{"type": "file", "platform": "cygwin", "file": "usr/lib/libdep1lib.dll.a"},
{"type": "expr", "file": "usr/lib/?libdep2lib.so"},
{"type": "file", "platform": "cygwin", "file": "usr/lib/libdep2lib.dll.a"},
+ {"type": "expr", "file": "usr/lib/?libdep3lib.so"},
+ {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep3lib.dll.a"},
{"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"},
{"type": "file", "file": "usr/lib/girepository-1.0/MesonDep1-1.0.typelib"},
{"type": "file", "file": "usr/lib/girepository-1.0/MesonDep2-1.0.typelib"},
+ {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep3-1.0.typelib"},
{"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"},
{"type": "file", "file": "usr/share/gir-1.0/MesonDep1-1.0.gir"},
{"type": "file", "file": "usr/share/gir-1.0/MesonDep2-1.0.gir"},
+ {"type": "file", "file": "usr/share/gir-1.0/MesonDep3-1.0.gir"},
{"type": "file", "file": "usr/share/glib-2.0/schemas/com.github.meson.gschema.xml"},
{"type": "file", "file": "usr/share/simple-resources.gresource"},
{"type": "file", "file": "usr/include/enums6.h"},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/unit/75 subdir libdir/meson.build" "new/meson-0.54.2/test cases/unit/75 subdir libdir/meson.build"
--- "old/meson-0.54.1/test cases/unit/75 subdir libdir/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/unit/75 subdir libdir/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,2 @@
+project('toplevel', 'c')
+subproject('flub')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.54.1/test cases/unit/75 subdir libdir/subprojects/flub/meson.build" "new/meson-0.54.2/test cases/unit/75 subdir libdir/subprojects/flub/meson.build"
--- "old/meson-0.54.1/test cases/unit/75 subdir libdir/subprojects/flub/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/unit/75 subdir libdir/subprojects/flub/meson.build" 2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1 @@
+project('subflub', 'c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.54.1/tools/boost_names.py new/meson-0.54.2/tools/boost_names.py
--- old/meson-0.54.1/tools/boost_names.py 2020-03-23 18:22:02.000000000 +0100
+++ new/meson-0.54.2/tools/boost_names.py 2020-05-15 09:23:18.000000000 +0200
@@ -43,10 +43,10 @@
class BoostLibrary():
def __init__(self, name: str, shared: T.List[str], static: T.List[str], single: T.List[str], multi: T.List[str]):
self.name = name
- self.shared = shared
- self.static = static
- self.single = single
- self.multi = multi
+ self.shared = sorted(set(shared))
+ self.static = sorted(set(static))
+ self.single = sorted(set(single))
+ self.multi = sorted(set(multi))
def __lt__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']:
if isinstance(other, BoostLibrary):
@@ -99,15 +99,35 @@
cmds = raw.split(';') # Commands always terminate with a ; (I hope)
cmds = [x.strip() for x in cmds] # Some cleanup
+ project_usage_requirements: T.List[str] = []
+
# "Parse" the relevant sections
for i in cmds:
parts = i.split(' ')
- parts = [x for x in parts if x not in ['', ':']]
+ parts = [x for x in parts if x not in ['']]
if not parts:
continue
- # Parese libraries
- if parts[0] in ['lib', 'boost-lib']:
+ # Parse project
+ if parts[0] in ['project']:
+ attributes: T.Dict[str, T.List[str]] = {}
+ curr: T.Optional[str] = None
+
+ for j in parts:
+ if j == ':':
+ curr = None
+ elif curr is None:
+ curr = j
+ else:
+ if curr not in attributes:
+ attributes[curr] = []
+ attributes[curr] += [j]
+
+ if 'usage-requirements' in attributes:
+ project_usage_requirements = attributes['usage-requirements']
+
+ # Parse libraries
+ elif parts[0] in ['lib', 'boost-lib']:
assert len(parts) >= 2
# Get and check the library name
@@ -117,28 +137,36 @@
if not lname.startswith('boost_'):
continue
+ # Count `:` to only select the 'usage-requirements'
+ # See https://boostorg.github.io/build/manual/master/index.html#bbv2.main-target-…
+ colon_counter = 0
+ usage_requirements: T.List[str] = []
+ for j in parts:
+ if j == ':':
+ colon_counter += 1
+ elif colon_counter >= 4:
+ usage_requirements += [j]
+
# Get shared / static defines
shared: T.List[str] = []
static: T.List[str] = []
single: T.List[str] = []
multi: T.List[str] = []
- for j in parts:
+ for j in usage_requirements + project_usage_requirements:
m1 = re.match(r'<link>shared:<define>(.*)', j)
m2 = re.match(r'<link>static:<define>(.*)', j)
m3 = re.match(r'<threading>single:<define>(.*)', j)
m4 = re.match(r'<threading>multi:<define>(.*)', j)
if m1:
- shared += [m1.group(1)]
+ shared += [f'-D{m1.group(1)}']
if m2:
- static += [m2.group(1)]
+ static += [f'-D{m2.group(1)}']
if m3:
- single += [m3.group(1)]
+ single +=[f'-D{m3.group(1)}']
if m4:
- multi += [m4.group(1)]
+ multi += [f'-D{m4.group(1)}']
- shared = [f'-D{x}' for x in shared]
- static = [f'-D{x}' for x in static]
libs += [BoostLibrary(lname, shared, static, single, multi)]
return libs
1
0
Hello community,
here is the log from the commit of package docker-runc for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/docker-runc (Old)
and /work/SRC/openSUSE:Leap:15.2/.docker-runc.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "docker-runc"
Sun May 31 13:45:24 2020 rev:42 rq:809438 version:1.0.0rc8+gitr3917_3e425f80a8c9
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/docker-runc/docker-runc.changes 2020-02-16 18:26:16.842653929 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.docker-runc.new.3606/docker-runc.changes 2020-05-31 13:45:34.253646062 +0200
@@ -1,0 +2,7 @@
+Wed May 13 06:49:44 UTC 2020 - Aleksa Sarai <asarai(a)suse.com>
+
+- Backport https://github.com/opencontainers/runc/pull/2391 to help fix
+ bsc#1168481.
+ + bsc1168481-0001-cgroup-devices-major-cleanups-and-minimal-transition.patch
+
+-------------------------------------------------------------------
New:
----
bsc1168481-0001-cgroup-devices-major-cleanups-and-minimal-transition.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ docker-runc.spec ++++++
--- /var/tmp/diff_new_pack.jCVr9e/_old 2020-05-31 13:45:35.021648439 +0200
+++ /var/tmp/diff_new_pack.jCVr9e/_new 2020-05-31 13:45:35.033648476 +0200
@@ -55,6 +55,8 @@
Patch1: CVE-2019-16884.patch
# FIX-UPSTREAM: Backport of https://github.com/opencontainers/runc/pull/2207.
Patch2: CVE-2019-19921.patch
+# FIX-UPSTREAM: Backport of https://github.com/opencontainers/runc/pull/2391. bsc#1168481
+Patch3: bsc1168481-0001-cgroup-devices-major-cleanups-and-minimal-transition.patch
BuildRequires: fdupes
BuildRequires: go-go-md2man
BuildRequires: libapparmor-devel
@@ -95,6 +97,8 @@
%patch1 -p1
# CVE-2019-19921
%patch2 -p1
+# bsc#1168481
+%patch3 -p1
%build
# Do not use symlinks. If you want to run the unit tests for this package at
++++++ bsc1168481-0001-cgroup-devices-major-cleanups-and-minimal-transition.patch ++++++
++++ 3531 lines (skipped)
1
0
Hello community,
here is the log from the commit of package mdadm for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/mdadm (Old)
and /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mdadm"
Sun May 31 13:45:23 2020 rev:46 rq:809423 version:4.1
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/mdadm/mdadm.changes 2020-01-15 15:28:44.746688013 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/mdadm.changes 2020-05-31 13:45:31.593637832 +0200
@@ -1,0 +2,229 @@
+Tue Mar 3 04:04:33 UTC 2020 - Coly Li <colyli(a)suse.com>
+
+- Update for latest mdadm-4.1+ patches, this is required by
+ jsc#SLE-10078 and jsc#SLE-9348. Mostly the purpose is for
+ latest Intel IMSM raid support.
+ The following patches also include previous patches with
+ new re-ordered prefix numbers.
+
+- Makefile: install mdadm_env.sh to /usr/lib/mdadm (bsc#1111960)
+ 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
+- Assemble: keep MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flag
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch
+- Document PART-POLICY lines (jsc#SLE-10078, jsc#SLE-9348)
+ 0002-Document-PART-POLICY-lines.patc
+- policy: support devices with multiple paths.
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0003-policy-support-devices-with-multiple-paths.patch
+- mdcheck: add systemd unit files to run mdcheck. (bsc#1115407)
+ 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
+- Monitor: add system timer to run --oneshot periodically (bsc#1115407)
+ 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch
+- imsm: update metadata correctly while raid10 double
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch
+- Assemble: mask FAILFAST and WRITEMOSTLY flags when finding
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch
+- Grow: avoid overflow in compute_backup_blocks()
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch
+- Grow: report correct new chunk size. (jsc#SLE-10078, jsc#SLE-9348)
+ 0009-Grow-report-correct-new-chunk-size.patch
+- policy.c: prevent NULL pointer referencing (bsc#1106078)
+ 0010-policy.c-prevent-NULL-pointer-referencing.patch
+- policy.c: Fix for compiler error (jsc#SLE-10078, jsc#SLE-9348)
+ 0012-policy.c-Fix-for-compiler-error.patch
+- imsm: finish recovery when drive with rebuild fails (bsc#1126975)
+ 0013-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
+- imsm: fix reshape for >2TB drives (jsc#SLE-10078, jsc#SLE-9348)
+ 0014-imsm-fix-reshape-for-2TB-drives.patch
+- Fix spelling typos. (jsc#SLE-10078, jsc#SLE-9348)
+ 0015-Fix-spelling-typos.patch
+- Detail.c: do not skip first character when calling xstrdup in
+ Detail() (bsc#1123814)
+ 0016-Detail.c-do-not-skip-first-character-when-calling-xs.patch
+- Fix reshape for decreasing data offset (jsc#SLE-10078, jsc#SLE-9348)
+ 0018-Fix-reshape-for-decreasing-data-offset.patch
+- mdadm/tests: add one test case for failfast of raid1
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0019-mdadm-tests-add-one-test-case-for-failfast-of-raid1.patch
+- mdmon: don't attempt to manage new arrays when terminating
+ (bsc#1127526)
+ 0020-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
+- mdmon: wait for previous mdmon to exit during takeover
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0021-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch
+- Assemble: Fix starting array with initial reshape checkpoint
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0022-Assemble-Fix-starting-array-with-initial-reshape-che.patch
+- add missing units to --examine (jsc#SLE-10078, jsc#SLE-9348)
+ 0023-add-missing-units-to-examine.patch
+- imsm: fix spare activation for old matrix arrays
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0024-imsm-fix-spare-activation-for-old-matrix-arrays.patch
+- Create: Block rounding size to max (jsc#SLE-10078, jsc#SLE-9348)
+ 0025-Create-Block-rounding-size-to-max.patch
+- udev: Add udev rules to create by-partuuid for md device
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0026-udev-Add-udev-rules-to-create-by-partuuid-for-md-dev.patch
+- mdmon: fix wrong array state when disk fails during mdmon
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0027-mdmon-fix-wrong-array-state-when-disk-fails-during-m.patch
+- Enable probe_roms to scan more than 6 roms. (bsc#1156040)
+ 0028-Enable-probe_roms-to-scan-more-than-6-roms.patch
+- super-intel: Fix issue with abs() being irrelevant
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0029-super-intel-Fix-issue-with-abs-being-irrelevant.patch
+- mdadm.h: Introduced unaligned {get,put}_unaligned{16,32}()
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0030-mdadm.h-Introduced-unaligned-get-put-_unaligned-16-3.patch
+- super-intel: Use put_unaligned in split_ull
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0031-super-intel-Use-put_unaligned-in-split_ull.patch
+- mdadm: load default sysfs attributes after assemblation
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0032-mdadm-load-default-sysfs-attributes-after-assemblati.patch
+- mdadm.h: include sysmacros.h unconditionally
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0033-mdadm.h-include-sysmacros.h-unconditionally.patch
+- mdadm: add --no-devices to avoid component devices detail
+ (bsc#1139709)
+ 0034-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
+- udev: add --no-devices option for calling 'mdadm (bsc#1139709)
+ 0035-udev-add-no-devices-option-for-calling-mdadm-detail.patch
+- imsm: close removed drive fd. (jsc#SLE-10078, jsc#SLE-9348)
+ 0036-imsm-close-removed-drive-fd.patch
+- mdadm: check value returned by snprintf against errors
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0037-mdadm-check-value-returned-by-snprintf-against-error.patch
+- mdadm: Introduce new array state 'broken' for raid0/linear
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0038-mdadm-Introduce-new-array-state-broken-for-raid0-lin.patch
+- mdadm: force a uuid swap on big endian (jsc#SLE-10078, jsc#SLE-9348)
+ 0039-mdadm-force-a-uuid-swap-on-big-endian.patch
+- mdadm/md.4: add the descriptions for bitmap sysfs nodes
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0040-mdadm-md.4-add-the-descriptions-for-bitmap-sysfs-nod.patch
+- Init devlist as an array (jsc#SLE-10078, jsc#SLE-9348)
+ 0041-Init-devlist-as-an-array.patch
+- Don't need to check recovery after re-add when no I/O writes
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0042-Don-t-need-to-check-recovery-after-re-add-when-no-I-.patch
+- udev: allow for udev attribute reading bug.
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0043-udev-allow-for-udev-attribute-reading-bug.patch
+- imsm: save current_vol number (jsc#SLE-10078, jsc#SLE-9348)
+ 0044-imsm-save-current_vol-number.patch
+- imsm: allow to specify second volume size
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0045-imsm-allow-to-specify-second-volume-size.patch
+- mdcheck: when mdcheck_start is enabled, enable (bsc#1153258)
+ 0046-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch
+- mdcheck: use ${} to pass variable to mdcheck (bsc#1153258)
+ 0050-mdcheck-use-to-pass-variable-to-mdcheck.patch
+- SUSE-mdadm_env.sh: handle MDADM_CHECK_DURATION (bsc#1153258)
+ 0051-SUSE-mdadm_env.sh-handle-MDADM_CHECK_DURATION.patch
+- super-intel: don't mark structs 'packed' unnecessarily
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0052-super-intel-don-t-mark-structs-packed-unnecessarily.patch
+- Manage: Remove the legacy code for md driver prior to 0.90.03
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0053-Manage-Remove-the-legacy-code-for-md-driver-prior-to.patch
+- Remove last traces of HOT_ADD_DISK (jsc#SLE-10078, jsc#SLE-9348)
+ 0054-Remove-last-traces-of-HOT_ADD_DISK.patch
+- Fix up a few formatting issues (jsc#SLE-10078, jsc#SLE-9348)
+ 0055-Fix-up-a-few-formatting-issues.patch
+- Remove unused code (jsc#SLE-10078, jsc#SLE-9348)
+ 0056-Remove-unused-code.patch
+- imsm: return correct uuid for volume in detail
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0057-imsm-return-correct-uuid-for-volume-in-detail.patch
+- imsm: Change the way of printing nvme drives in
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0058-imsm-Change-the-way-of-printing-nvme-drives-in-detai.patch
+- Create: add support for RAID0 layouts. (bsc#1162479)
+ 0059-Create-add-support-for-RAID0-layouts.patch
+- Assemble: add support for RAID0 layouts. (bsc#1162479)
+ 0060-Assemble-add-support-for-RAID0-layouts.patch
+- Respect $(CROSS_COMPILE) when $(CC) is the default
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0061-Respect-CROSS_COMPILE-when-CC-is-the-default.patch
+- Change warning message (jsc#SLE-10078, jsc#SLE-9348)
+ 0062-Change-warning-message.patch
+- mdcheck service can't start succesfully because of syntax
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0063-mdcheck-service-can-t-start-succesfully-because-of-s.patch
+- imsm: Update grow manual. (jsc#SLE-10078, jsc#SLE-9348)
+ 0064-imsm-Update-grow-manual.patch
+- Add support for Tebibytes (jsc#SLE-10078, jsc#SLE-9348)
+ 0065-Add-support-for-Tebibytes.patch
+- imsm: fill working_disks according to metadata.
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0066-imsm-fill-working_disks-according-to-metadata.patch
+- mdadm.8: add note information for raid0 growing operation
+ (bsc#1129900)
+ 0067-mdadm.8-add-note-information-for-raid0-growing-opera.patch
+- Remove the legacy whitespace (jsc#SLE-10078, jsc#SLE-9348)
+ 0068-Remove-the-legacy-whitespace.patch
+- imsm: pass subarray id to kill_subarray function
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0069-imsm-pass-subarray-id-to-kill_subarray-function.patch
+- imsm: Remove --dump/--restore implementation
+ (jsc#SLE-10078, jsc#SLE-9348)
+ 0070-imsm-Remove-dump-restore-implementation.patch
+
+-------------------------------------------------------------------
+Tue Mar 3 04:02:16 UTC 2020 - Coly Li <colyli(a)suse.com>
+
+- Rename the following patches, they will be listed with new
+ re-ordered prefix number in following commit,
+ 0001-Document-PART-POLICY-lines.patch
+ 0001-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
+ 0002-policy-support-devices-with-multiple-paths.patch
+ 0003-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
+ 0004-Monitor-add-system-timer-to-run-oneshot-periodically.patch
+ 0005-imsm-update-metadata-correctly-while-raid10-double-d.patch
+ 0006-Grow-avoid-overflow-in-compute_backup_blocks.patch
+ 0007-Grow-report-correct-new-chunk-size.patch
+ 0008-policy.c-prevent-NULL-pointer-referencing.patch
+ 0009-Detail.c-do-not-skip-first-character-when-calling-xs.patch
+ 0010-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
+ 0011-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
+ 0012-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
+ 0013-udev-add-no-devices-option-for-calling-mdadm-detail.patch
+ 0021-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch
+ 0022-mdcheck-use-to-pass-variable-to-mdcheck.patch
++++ 32 more lines (skipped)
++++ between /work/SRC/openSUSE:Leap:15.2/mdadm/mdadm.changes
++++ and /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/mdadm.changes
Old:
----
0001-Document-PART-POLICY-lines.patch
0001-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
0002-policy-support-devices-with-multiple-paths.patch
0003-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
0004-Monitor-add-system-timer-to-run-oneshot-periodically.patch
0005-imsm-update-metadata-correctly-while-raid10-double-d.patch
0006-Grow-avoid-overflow-in-compute_backup_blocks.patch
0007-Grow-report-correct-new-chunk-size.patch
0008-policy.c-prevent-NULL-pointer-referencing.patch
0009-Detail.c-do-not-skip-first-character-when-calling-xs.patch
0010-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
0011-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
0012-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
0013-udev-add-no-devices-option-for-calling-mdadm-detail.patch
New:
----
0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch
0002-Document-PART-POLICY-lines.patch
0003-policy-support-devices-with-multiple-paths.patch
0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch
0006-imsm-update-metadata-correctly-while-raid10-double-d.patch
0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch
0008-Grow-avoid-overflow-in-compute_backup_blocks.patch
0009-Grow-report-correct-new-chunk-size.patch
0010-policy.c-prevent-NULL-pointer-referencing.patch
0012-policy.c-Fix-for-compiler-error.patch
0013-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
0014-imsm-fix-reshape-for-2TB-drives.patch
0015-Fix-spelling-typos.patch
0016-Detail.c-do-not-skip-first-character-when-calling-xs.patch
0018-Fix-reshape-for-decreasing-data-offset.patch
0019-mdadm-tests-add-one-test-case-for-failfast-of-raid1.patch
0020-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
0021-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch
0022-Assemble-Fix-starting-array-with-initial-reshape-che.patch
0023-add-missing-units-to-examine.patch
0024-imsm-fix-spare-activation-for-old-matrix-arrays.patch
0025-Create-Block-rounding-size-to-max.patch
0026-udev-Add-udev-rules-to-create-by-partuuid-for-md-dev.patch
0027-mdmon-fix-wrong-array-state-when-disk-fails-during-m.patch
0028-Enable-probe_roms-to-scan-more-than-6-roms.patch
0029-super-intel-Fix-issue-with-abs-being-irrelevant.patch
0030-mdadm.h-Introduced-unaligned-get-put-_unaligned-16-3.patch
0031-super-intel-Use-put_unaligned-in-split_ull.patch
0032-mdadm-load-default-sysfs-attributes-after-assemblati.patch
0033-mdadm.h-include-sysmacros.h-unconditionally.patch
0034-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
0035-udev-add-no-devices-option-for-calling-mdadm-detail.patch
0036-imsm-close-removed-drive-fd.patch
0037-mdadm-check-value-returned-by-snprintf-against-error.patch
0038-mdadm-Introduce-new-array-state-broken-for-raid0-lin.patch
0039-mdadm-force-a-uuid-swap-on-big-endian.patch
0040-mdadm-md.4-add-the-descriptions-for-bitmap-sysfs-nod.patch
0041-Init-devlist-as-an-array.patch
0042-Don-t-need-to-check-recovery-after-re-add-when-no-I-.patch
0043-udev-allow-for-udev-attribute-reading-bug.patch
0044-imsm-save-current_vol-number.patch
0045-imsm-allow-to-specify-second-volume-size.patch
0046-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch
0050-mdcheck-use-to-pass-variable-to-mdcheck.patch
0051-SUSE-mdadm_env.sh-handle-MDADM_CHECK_DURATION.patch
0052-super-intel-don-t-mark-structs-packed-unnecessarily.patch
0053-Manage-Remove-the-legacy-code-for-md-driver-prior-to.patch
0054-Remove-last-traces-of-HOT_ADD_DISK.patch
0055-Fix-up-a-few-formatting-issues.patch
0056-Remove-unused-code.patch
0057-imsm-return-correct-uuid-for-volume-in-detail.patch
0058-imsm-Change-the-way-of-printing-nvme-drives-in-detai.patch
0059-Create-add-support-for-RAID0-layouts.patch
0060-Assemble-add-support-for-RAID0-layouts.patch
0061-Respect-CROSS_COMPILE-when-CC-is-the-default.patch
0062-Change-warning-message.patch
0063-mdcheck-service-can-t-start-succesfully-because-of-s.patch
0064-imsm-Update-grow-manual.patch
0065-Add-support-for-Tebibytes.patch
0066-imsm-fill-working_disks-according-to-metadata.patch
0067-mdadm.8-add-note-information-for-raid0-growing-opera.patch
0068-Remove-the-legacy-whitespace.patch
0069-imsm-pass-subarray-id-to-kill_subarray-function.patch
0070-imsm-Remove-dump-restore-implementation.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mdadm.spec ++++++
--- /var/tmp/diff_new_pack.DruoCF/_old 2020-05-31 13:45:32.577640877 +0200
+++ /var/tmp/diff_new_pack.DruoCF/_new 2020-05-31 13:45:32.593640926 +0200
@@ -41,20 +41,72 @@
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz
Source1: Software-RAID.HOWTO.tar.bz2
Source2: sysconfig.mdadm
-Patch1: 0001-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
-Patch11: 0001-Document-PART-POLICY-lines.patch
-Patch12: 0002-policy-support-devices-with-multiple-paths.patch
-Patch13: 0003-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
-Patch14: 0004-Monitor-add-system-timer-to-run-oneshot-periodically.patch
-Patch15: 0005-imsm-update-metadata-correctly-while-raid10-double-d.patch
-Patch16: 0006-Grow-avoid-overflow-in-compute_backup_blocks.patch
-Patch17: 0007-Grow-report-correct-new-chunk-size.patch
-Patch18: 0008-policy.c-prevent-NULL-pointer-referencing.patch
-Patch19: 0009-Detail.c-do-not-skip-first-character-when-calling-xs.patch
-Patch20: 0010-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
-Patch21: 0011-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
-Patch22: 0012-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
-Patch23: 0013-udev-add-no-devices-option-for-calling-mdadm-detail.patch
+Patch0: 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch
+Patch1: 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch
+Patch2: 0002-Document-PART-POLICY-lines.patch
+Patch3: 0003-policy-support-devices-with-multiple-paths.patch
+Patch4: 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch
+Patch5: 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch
+Patch6: 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch
+Patch7: 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch
+Patch8: 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch
+Patch9: 0009-Grow-report-correct-new-chunk-size.patch
+Patch10: 0010-policy.c-prevent-NULL-pointer-referencing.patch
+Patch11: 0012-policy.c-Fix-for-compiler-error.patch
+Patch12: 0013-imsm-finish-recovery-when-drive-with-rebuild-fails.patch
+Patch13: 0014-imsm-fix-reshape-for-2TB-drives.patch
+Patch14: 0015-Fix-spelling-typos.patch
+Patch15: 0016-Detail.c-do-not-skip-first-character-when-calling-xs.patch
+Patch16: 0018-Fix-reshape-for-decreasing-data-offset.patch
+Patch17: 0019-mdadm-tests-add-one-test-case-for-failfast-of-raid1.patch
+Patch18: 0020-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
+Patch19: 0021-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch
+Patch20: 0022-Assemble-Fix-starting-array-with-initial-reshape-che.patch
+Patch21: 0023-add-missing-units-to-examine.patch
+Patch22: 0024-imsm-fix-spare-activation-for-old-matrix-arrays.patch
+Patch23: 0025-Create-Block-rounding-size-to-max.patch
+Patch24: 0026-udev-Add-udev-rules-to-create-by-partuuid-for-md-dev.patch
+Patch25: 0027-mdmon-fix-wrong-array-state-when-disk-fails-during-m.patch
+Patch26: 0028-Enable-probe_roms-to-scan-more-than-6-roms.patch
+Patch27: 0029-super-intel-Fix-issue-with-abs-being-irrelevant.patch
+Patch28: 0030-mdadm.h-Introduced-unaligned-get-put-_unaligned-16-3.patch
+Patch29: 0031-super-intel-Use-put_unaligned-in-split_ull.patch
+Patch30: 0032-mdadm-load-default-sysfs-attributes-after-assemblati.patch
+Patch31: 0033-mdadm.h-include-sysmacros.h-unconditionally.patch
+Patch32: 0034-mdadm-add-no-devices-to-avoid-component-devices-deta.patch
+Patch33: 0035-udev-add-no-devices-option-for-calling-mdadm-detail.patch
+Patch34: 0036-imsm-close-removed-drive-fd.patch
+Patch35: 0037-mdadm-check-value-returned-by-snprintf-against-error.patch
+Patch36: 0038-mdadm-Introduce-new-array-state-broken-for-raid0-lin.patch
+Patch37: 0039-mdadm-force-a-uuid-swap-on-big-endian.patch
+Patch38: 0040-mdadm-md.4-add-the-descriptions-for-bitmap-sysfs-nod.patch
+Patch39: 0041-Init-devlist-as-an-array.patch
+Patch40: 0042-Don-t-need-to-check-recovery-after-re-add-when-no-I-.patch
+Patch41: 0043-udev-allow-for-udev-attribute-reading-bug.patch
+Patch42: 0044-imsm-save-current_vol-number.patch
+Patch43: 0045-imsm-allow-to-specify-second-volume-size.patch
+Patch44: 0046-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch
+Patch45: 0050-mdcheck-use-to-pass-variable-to-mdcheck.patch
+Patch46: 0051-SUSE-mdadm_env.sh-handle-MDADM_CHECK_DURATION.patch
+Patch47: 0052-super-intel-don-t-mark-structs-packed-unnecessarily.patch
+Patch48: 0053-Manage-Remove-the-legacy-code-for-md-driver-prior-to.patch
+Patch49: 0054-Remove-last-traces-of-HOT_ADD_DISK.patch
+Patch50: 0055-Fix-up-a-few-formatting-issues.patch
+Patch51: 0056-Remove-unused-code.patch
+Patch52: 0057-imsm-return-correct-uuid-for-volume-in-detail.patch
+Patch53: 0058-imsm-Change-the-way-of-printing-nvme-drives-in-detai.patch
+Patch54: 0059-Create-add-support-for-RAID0-layouts.patch
+Patch55: 0060-Assemble-add-support-for-RAID0-layouts.patch
+Patch56: 0061-Respect-CROSS_COMPILE-when-CC-is-the-default.patch
+Patch57: 0062-Change-warning-message.patch
+Patch58: 0063-mdcheck-service-can-t-start-succesfully-because-of-s.patch
+Patch59: 0064-imsm-Update-grow-manual.patch
+Patch60: 0065-Add-support-for-Tebibytes.patch
+Patch61: 0066-imsm-fill-working_disks-according-to-metadata.patch
+Patch62: 0067-mdadm.8-add-note-information-for-raid0-growing-opera.patch
+Patch63: 0068-Remove-the-legacy-whitespace.patch
+Patch64: 0069-imsm-pass-subarray-id-to-kill_subarray-function.patch
+Patch65: 0070-imsm-Remove-dump-restore-implementation.patch
Patch1001: 1001-display-timeout-status.patch
%define _udevdir %(pkg-config --variable=udevdir udev)
%define _systemdshutdowndir %{_unitdir}/../system-shutdown
@@ -64,7 +116,17 @@
%prep
%setup -q -a1
+%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
@@ -78,6 +140,48 @@
%patch21 -p1
%patch22 -p1
%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p1
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+%patch56 -p1
+%patch57 -p1
+%patch58 -p1
+%patch59 -p1
+%patch60 -p1
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1
%patch1001 -p1
%build
++++++ 0001-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch -> 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0001-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch 2020-01-15 15:28:44.334687782 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch 2020-05-31 13:45:26.193621123 +0200
@@ -2,6 +2,7 @@
From: colyli <colyli(a)suse.coly>
Date: Wed, 17 Oct 2018 11:08:39 +0800
Subject: [PATCH] Makefile: install mdadm_env.sh to /usr/lib/mdadm
+References: bsc#1111960
Current Makefile installs mdadm_env.sh to /usr/libexec/mdadm but calls it
from /usr/lib/mdadm. This patch changes the installation directory to
++++++ 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch ++++++
>From 0833f9c3dbaaee202b92ea956f9e2decc7b9593a Mon Sep 17 00:00:00 2001
From: Gioh Kim <gi-oh.kim(a)profitbricks.com>
Date: Tue, 6 Nov 2018 15:27:42 +0100
Subject: [PATCH] Assemble: keep MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flag
Git-commit: 0833f9c3dbaaee202b92ea956f9e2decc7b9593a
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Before updating superblock of slave disks, desired_state value
is set for the target state of the slave disks. But it forgets
to check MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flags. Then
start_arrays() calls ADD_NEW_DISK ioctl-call and pass the state
without MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY.
Currenlty it does not generate any problem because kernel does not
care MD_DISK_FAILFAST or MD_DISK_WRITEMOSTLY flags.
Reviewed-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Gioh Kim <gi-oh.kim(a)profitbricks.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Assemble.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Assemble.c b/Assemble.c
index a79466c..f39c9e1 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1704,6 +1704,9 @@ try_again:
else
desired_state = (1<<MD_DISK_ACTIVE) | (1<<MD_DISK_SYNC);
+ desired_state |= devices[j].i.disk.state & ((1<<MD_DISK_FAILFAST) |
+ (1<<MD_DISK_WRITEMOSTLY));
+
if (!devices[j].uptodate)
continue;
--
2.25.0
++++++ 0001-Document-PART-POLICY-lines.patch -> 0002-Document-PART-POLICY-lines.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0001-Document-PART-POLICY-lines.patch 2020-01-15 15:28:44.302687765 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0002-Document-PART-POLICY-lines.patch 2020-05-31 13:45:27.273624465 +0200
@@ -2,6 +2,9 @@
From: NeilBrown <neilb(a)suse.com>
Date: Fri, 9 Nov 2018 17:12:33 +1100
Subject: [PATCH 1/5] Document PART-POLICY lines
+Git-commit: 6b6112842030309c297a521918d1a2e982426fa3
+Patch-mainline: mdadm-4.1+
+References: jsc#SLE-10078, jsc#SLE-9348
PART-POLICY has been accepted in mdadm.conf since the same
time that POLICY was accepted, but it was never documented.
@@ -12,6 +15,8 @@
Signed-off-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
+Signed-off-by: Coly Li <colyli(a)suse.de>
+
---
mdadm.conf.5 | 24 +++++++++++++++++++++++-
policy.c | 2 +-
++++++ 0002-policy-support-devices-with-multiple-paths.patch -> 0003-policy-support-devices-with-multiple-paths.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0002-policy-support-devices-with-multiple-paths.patch 2020-01-15 15:28:44.354687793 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0003-policy-support-devices-with-multiple-paths.patch 2020-05-31 13:45:27.449625009 +0200
@@ -2,6 +2,9 @@
From: NeilBrown <neilb(a)suse.com>
Date: Fri, 9 Nov 2018 17:12:33 +1100
Subject: [PATCH 2/5] policy: support devices with multiple paths.
+Git-commit: cd72f9d114da206baa01fd56ff2d8ffcc08f3239
+Patch-mainline: mdadm-4.1+
+References: jsc#SLE-10078, jsc#SLE-9348
As new releases of Linux some time change the name of
a path, some distros keep "legacy" names as well. This
@@ -15,6 +18,8 @@
Reported-and-tested-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
+Signed-off-by: Coly Li <colyli(a)suse.de>
+
---
Incremental.c | 5 +-
mdadm.h | 2 +-
++++++ 0003-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch -> 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0003-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch 2020-01-15 15:28:44.386687812 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch 2020-05-31 13:45:27.509625195 +0200
@@ -2,6 +2,9 @@
From: NeilBrown <neilb(a)suse.com>
Date: Wed, 5 Dec 2018 16:35:00 +1100
Subject: [PATCH 3/5] mdcheck: add systemd unit files to run mdcheck.
+Git-commit: 4199d3c629c14866505923d19fa50017ee92d2e1
+Patch-mainline: mdadm-4.1+
+References: bsc#1115407
Having the mdcheck script is not use if is never run.
This patch adds systemd unit files so that it can easily
++++++ 0004-Monitor-add-system-timer-to-run-oneshot-periodically.patch -> 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0004-Monitor-add-system-timer-to-run-oneshot-periodically.patch 2020-01-15 15:28:44.414687827 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch 2020-05-31 13:45:27.529625257 +0200
@@ -2,6 +2,9 @@
From: NeilBrown <neilb(a)suse.com>
Date: Wed, 5 Dec 2018 16:35:00 +1100
Subject: [PATCH 4/5] Monitor: add system timer to run --oneshot periodically
+Git-commit: 7cd7e91ab3de5aa75dc963cb08b0618c1885cf0d
+Patch-mainline: mdadm-4.1+
+References: bsc#1115407
"mdadm --monitor --oneshot" can be used to get a warning
if there are any degraded arrays. It can be helpful to get
++++++ 0005-imsm-update-metadata-correctly-while-raid10-double-d.patch -> 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0005-imsm-update-metadata-correctly-while-raid10-double-d.patch 2020-01-15 15:28:44.430687837 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0006-imsm-update-metadata-correctly-while-raid10-double-d.patch 2020-05-31 13:45:27.549625319 +0200
@@ -3,6 +3,9 @@
Date: Wed, 17 Oct 2018 12:11:41 +0200
Subject: [PATCH 5/5] imsm: update metadata correctly while raid10 double
degradation
+Git-commit: d7a1fda2769ba272d89de6caeab35d52b73a9c3c
+Patch-mainline: mdadm-4.1+
+References: jsc#SLE-10078, jsc#SLE-9348
Mdmon calls end_migration() when map state changes from normal to
degraded. It is not valid because in raid 10 double degradation case
@@ -21,6 +24,8 @@
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
+Signed-off-by: Coly Li <colyli(a)suse.de>
+
---
super-intel.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
++++++ 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch ++++++
>From 563ac108659980b3d1e226fe416254a86656235f Mon Sep 17 00:00:00 2001
From: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
Date: Tue, 6 Nov 2018 16:20:17 +0100
Subject: [PATCH] Assemble: mask FAILFAST and WRITEMOSTLY flags when finding
the most recent device
Git-commit: 563ac108659980b3d1e226fe416254a86656235f
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
If devices[].i.disk.state has MD_DISK_FAILFAST or MD_DISK_WRITEMOSTLY
flag, it cannot be the most recent device. Both flags should be masked
before checking the state.
Reviewed-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Assemble.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Assemble.c b/Assemble.c
index f39c9e1..9f75c68 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -578,6 +578,7 @@ static int load_devices(struct devs *devices, char *devmap,
struct supertype *tst;
int i;
int dfd;
+ int disk_state;
if (tmpdev->used != 1)
continue;
@@ -711,7 +712,9 @@ static int load_devices(struct devs *devices, char *devmap,
devices[devcnt].i.disk.major = major(stb.st_rdev);
devices[devcnt].i.disk.minor = minor(stb.st_rdev);
- if (devices[devcnt].i.disk.state == 6) {
+ disk_state = devices[devcnt].i.disk.state & ~((1<<MD_DISK_FAILFAST) |
+ (1<<MD_DISK_WRITEMOSTLY));
+ if (disk_state == ((1<<MD_DISK_ACTIVE) | (1<<MD_DISK_SYNC))) {
if (most_recent < 0 ||
devices[devcnt].i.events
> devices[most_recent].i.events) {
--
2.25.0
++++++ 0006-Grow-avoid-overflow-in-compute_backup_blocks.patch -> 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0006-Grow-avoid-overflow-in-compute_backup_blocks.patch 2020-01-15 15:28:44.442687843 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0008-Grow-avoid-overflow-in-compute_backup_blocks.patch 2020-05-31 13:45:27.605625492 +0200
@@ -2,6 +2,9 @@
From: NeilBrown <neilb(a)suse.com>
Date: Thu, 6 Dec 2018 10:35:41 +1100
Subject: [PATCH] Grow: avoid overflow in compute_backup_blocks()
+Git-commit: 085df42259cba7863cd6ebe5cd0d8492ac5b869e
+Patch-mainline: mdadm-4.1+
+References: jsc#SLE-10078, jsc#SLE-9348
With a chunk size of 16Meg and data drive count of 8,
this calculate can easily overflow the 'int' type that
@@ -11,6 +14,8 @@
Reported-and-tested-by: Ed Spiridonov <edo.rus(a)gmail.com>
Signed-off-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
+Signed-off-by: Coly Li <colyli(a)suse.de>
+
---
Grow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
++++++ 0007-Grow-report-correct-new-chunk-size.patch -> 0009-Grow-report-correct-new-chunk-size.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0007-Grow-report-correct-new-chunk-size.patch 2020-01-15 15:28:44.462687854 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0009-Grow-report-correct-new-chunk-size.patch 2020-05-31 13:45:27.637625591 +0200
@@ -2,12 +2,17 @@
From: NeilBrown <neilb(a)suse.com>
Date: Thu, 6 Dec 2018 10:36:28 +1100
Subject: [PATCH] Grow: report correct new chunk size.
+Git-commit: 76d505dec6c9f92564553596fc8350324be82463
+Patch-mainline: mdadm-4.1+
+References: jsc#SLE-10078, jsc#SLE-9348
When using "--grow --chunk=" to change chunk
size, the old chunksize is reported instead of the new.
Signed-off-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
+Signed-off-by: Coly Li <colyli(a)suse.de>
+
---
Grow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
++++++ 0008-policy.c-prevent-NULL-pointer-referencing.patch -> 0010-policy.c-prevent-NULL-pointer-referencing.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0008-policy.c-prevent-NULL-pointer-referencing.patch 2020-01-15 15:28:44.482687865 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0010-policy.c-prevent-NULL-pointer-referencing.patch 2020-05-31 13:45:27.669625690 +0200
@@ -1,18 +1,23 @@
-From 179cab343006df996f0a85a542b40e44db0c2e2f Mon Sep 17 00:00:00 2001
+From 467e6a1b4ece8e552ee638dab7f44a4d235ece1a Mon Sep 17 00:00:00 2001
From: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
Date: Fri, 7 Dec 2018 12:04:44 +0100
Subject: [PATCH] policy.c: prevent NULL pointer referencing
+Git-commit: 467e6a1b4ece8e552ee638dab7f44a4d235ece1a
+Patch-mainline: mdadm-4.1
+References: bsc#1106078
paths could be NULL and paths[0] should be followed by NULL pointer
checking.
+Reviewed-by: NeilBrown <neilb(a)suse.com>
Signed-off-by: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
+Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/policy.c b/policy.c
-index fa67d5594c04..e3a0671f3a3a 100644
+index fa67d55..e3a0671 100644
--- a/policy.c
+++ b/policy.c
@@ -383,7 +383,7 @@ struct dev_policy *path_policy(char **paths, char *type)
@@ -25,5 +30,5 @@
const char *d =
superlist[i]->get_disk_controller_domain(
--
-2.14.0.rc0.dirty
+2.25.0
++++++ 0012-policy.c-Fix-for-compiler-error.patch ++++++
>From 757e55435997e355ee9b03e5d913b5496a3c39a8 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Date: Tue, 11 Dec 2018 15:04:07 +0100
Subject: [PATCH] policy.c: Fix for compiler error
Git-commit: 757e55435997e355ee9b03e5d913b5496a3c39a8
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
After cd72f9d(policy: support devices with multiple paths.) compilation
on old compilers fails because "‘p’ may be used uninitialized
in this function".
Initialize it with NULL to prevent this.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/policy.c b/policy.c
index e3a0671..3c53bd3 100644
--- a/policy.c
+++ b/policy.c
@@ -268,7 +268,7 @@ static int pol_match(struct rule *rule, char **paths, char *type, char **part)
for (; rule; rule = rule->next) {
if (rule->name == rule_path) {
- char *p;
+ char *p = NULL;
int i;
if (pathok == 0)
pathok = -1;
--
2.25.0
++++++ 0010-imsm-finish-recovery-when-drive-with-rebuild-fails.patch -> 0013-imsm-finish-recovery-when-drive-with-rebuild-fails.patch ++++++
++++++ 0014-imsm-fix-reshape-for-2TB-drives.patch ++++++
>From 9f4218274cd4a1e1f356a1617f9a1d09960cf255 Mon Sep 17 00:00:00 2001
From: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Date: Mon, 28 Jan 2019 17:10:41 +0100
Subject: [PATCH] imsm: fix reshape for >2TB drives
Git-commit: 9f4218274cd4a1e1f356a1617f9a1d09960cf255
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
If reshape is performed on drives larger then 2 TB,
migration checkpoint area that is calculated exeeds 32-bit value.
This checkpoint area is a reserved space threated as backup
during reshape - at the end of the drive, right before metadata.
As a result - wrong space is used and the data that may exists there
is overwritten.
Adding additional field to migration record to track high order 32-bits
of pba of this area. Three other fields that may exceed 32-bit value
for large drives are added as well.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 149 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 107 insertions(+), 42 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 38a1b6c..1cc7d5f 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -296,7 +296,7 @@ struct migr_record {
__u32 rec_status; /* Status used to determine how to restart
* migration in case it aborts
* in some fashion */
- __u32 curr_migr_unit; /* 0..numMigrUnits-1 */
+ __u32 curr_migr_unit_lo; /* 0..numMigrUnits-1 */
__u32 family_num; /* Family number of MPB
* containing the RaidDev
* that is migrating */
@@ -306,16 +306,23 @@ struct migr_record {
__u32 dest_depth_per_unit; /* Num member blocks each destMap
* member disk
* advances per unit-of-operation */
- __u32 ckpt_area_pba; /* Pba of first block of ckpt copy area */
- __u32 dest_1st_member_lba; /* First member lba on first
- * stripe of destination */
- __u32 num_migr_units; /* Total num migration units-of-op */
+ __u32 ckpt_area_pba_lo; /* Pba of first block of ckpt copy area */
+ __u32 dest_1st_member_lba_lo; /* First member lba on first
+ * stripe of destination */
+ __u32 num_migr_units_lo; /* Total num migration units-of-op */
__u32 post_migr_vol_cap; /* Size of volume after
* migration completes */
__u32 post_migr_vol_cap_hi; /* Expansion space for LBA64 */
__u32 ckpt_read_disk_num; /* Which member disk in destSubMap[0] the
* migration ckpt record was read from
* (for recovered migrations) */
+ __u32 curr_migr_unit_hi; /* 0..numMigrUnits-1 high order 32 bits */
+ __u32 ckpt_area_pba_hi; /* Pba of first block of ckpt copy area
+ * high order 32 bits */
+ __u32 dest_1st_member_lba_hi; /* First member lba on first stripe of
+ * destination - high order 32 bits */
+ __u32 num_migr_units_hi; /* Total num migration units-of-op
+ * high order 32 bits */
} __attribute__ ((__packed__));
struct md_list {
@@ -1208,6 +1215,38 @@ static unsigned long long imsm_dev_size(struct imsm_dev *dev)
return join_u32(dev->size_low, dev->size_high);
}
+static unsigned long long migr_chkp_area_pba(struct migr_record *migr_rec)
+{
+ if (migr_rec == NULL)
+ return 0;
+ return join_u32(migr_rec->ckpt_area_pba_lo,
+ migr_rec->ckpt_area_pba_hi);
+}
+
+static unsigned long long current_migr_unit(struct migr_record *migr_rec)
+{
+ if (migr_rec == NULL)
+ return 0;
+ return join_u32(migr_rec->curr_migr_unit_lo,
+ migr_rec->curr_migr_unit_hi);
+}
+
+static unsigned long long migr_dest_1st_member_lba(struct migr_record *migr_rec)
+{
+ if (migr_rec == NULL)
+ return 0;
+ return join_u32(migr_rec->dest_1st_member_lba_lo,
+ migr_rec->dest_1st_member_lba_hi);
+}
+
+static unsigned long long get_num_migr_units(struct migr_record *migr_rec)
+{
+ if (migr_rec == NULL)
+ return 0;
+ return join_u32(migr_rec->num_migr_units_lo,
+ migr_rec->num_migr_units_hi);
+}
+
static void set_total_blocks(struct imsm_disk *disk, unsigned long long n)
{
split_ull(n, &disk->total_blocks_lo, &disk->total_blocks_hi);
@@ -1233,6 +1272,33 @@ static void set_imsm_dev_size(struct imsm_dev *dev, unsigned long long n)
split_ull(n, &dev->size_low, &dev->size_high);
}
+static void set_migr_chkp_area_pba(struct migr_record *migr_rec,
+ unsigned long long n)
+{
+ split_ull(n, &migr_rec->ckpt_area_pba_lo, &migr_rec->ckpt_area_pba_hi);
+}
+
+static void set_current_migr_unit(struct migr_record *migr_rec,
+ unsigned long long n)
+{
+ split_ull(n, &migr_rec->curr_migr_unit_lo,
+ &migr_rec->curr_migr_unit_hi);
+}
+
+static void set_migr_dest_1st_member_lba(struct migr_record *migr_rec,
+ unsigned long long n)
+{
+ split_ull(n, &migr_rec->dest_1st_member_lba_lo,
+ &migr_rec->dest_1st_member_lba_hi);
+}
+
+static void set_num_migr_units(struct migr_record *migr_rec,
+ unsigned long long n)
+{
+ split_ull(n, &migr_rec->num_migr_units_lo,
+ &migr_rec->num_migr_units_hi);
+}
+
static unsigned long long per_dev_array_size(struct imsm_map *map)
{
unsigned long long array_size = 0;
@@ -1629,12 +1695,14 @@ void convert_to_4k_imsm_migr_rec(struct intel_super *super)
struct migr_record *migr_rec = super->migr_rec;
migr_rec->blocks_per_unit /= IMSM_4K_DIV;
- migr_rec->ckpt_area_pba /= IMSM_4K_DIV;
- migr_rec->dest_1st_member_lba /= IMSM_4K_DIV;
migr_rec->dest_depth_per_unit /= IMSM_4K_DIV;
split_ull((join_u32(migr_rec->post_migr_vol_cap,
migr_rec->post_migr_vol_cap_hi) / IMSM_4K_DIV),
&migr_rec->post_migr_vol_cap, &migr_rec->post_migr_vol_cap_hi);
+ set_migr_chkp_area_pba(migr_rec,
+ migr_chkp_area_pba(migr_rec) / IMSM_4K_DIV);
+ set_migr_dest_1st_member_lba(migr_rec,
+ migr_dest_1st_member_lba(migr_rec) / IMSM_4K_DIV);
}
void convert_to_4k_imsm_disk(struct imsm_disk *disk)
@@ -1727,8 +1795,8 @@ void examine_migr_rec_imsm(struct intel_super *super)
printf("Normal\n");
else
printf("Contains Data\n");
- printf(" Current Unit : %u\n",
- __le32_to_cpu(migr_rec->curr_migr_unit));
+ printf(" Current Unit : %llu\n",
+ current_migr_unit(migr_rec));
printf(" Family : %u\n",
__le32_to_cpu(migr_rec->family_num));
printf(" Ascending : %u\n",
@@ -1737,16 +1805,15 @@ void examine_migr_rec_imsm(struct intel_super *super)
__le32_to_cpu(migr_rec->blocks_per_unit));
printf(" Dest. Depth Per Unit : %u\n",
__le32_to_cpu(migr_rec->dest_depth_per_unit));
- printf(" Checkpoint Area pba : %u\n",
- __le32_to_cpu(migr_rec->ckpt_area_pba));
- printf(" First member lba : %u\n",
- __le32_to_cpu(migr_rec->dest_1st_member_lba));
- printf(" Total Number of Units : %u\n",
- __le32_to_cpu(migr_rec->num_migr_units));
- printf(" Size of volume : %u\n",
- __le32_to_cpu(migr_rec->post_migr_vol_cap));
- printf(" Expansion space for LBA64 : %u\n",
- __le32_to_cpu(migr_rec->post_migr_vol_cap_hi));
+ printf(" Checkpoint Area pba : %llu\n",
+ migr_chkp_area_pba(migr_rec));
+ printf(" First member lba : %llu\n",
+ migr_dest_1st_member_lba(migr_rec));
+ printf(" Total Number of Units : %llu\n",
+ get_num_migr_units(migr_rec));
+ printf(" Size of volume : %llu\n",
+ join_u32(migr_rec->post_migr_vol_cap,
+ migr_rec->post_migr_vol_cap_hi));
printf(" Record was read from : %u\n",
__le32_to_cpu(migr_rec->ckpt_read_disk_num));
@@ -1759,13 +1826,15 @@ void convert_from_4k_imsm_migr_rec(struct intel_super *super)
struct migr_record *migr_rec = super->migr_rec;
migr_rec->blocks_per_unit *= IMSM_4K_DIV;
- migr_rec->ckpt_area_pba *= IMSM_4K_DIV;
- migr_rec->dest_1st_member_lba *= IMSM_4K_DIV;
migr_rec->dest_depth_per_unit *= IMSM_4K_DIV;
split_ull((join_u32(migr_rec->post_migr_vol_cap,
migr_rec->post_migr_vol_cap_hi) * IMSM_4K_DIV),
&migr_rec->post_migr_vol_cap,
&migr_rec->post_migr_vol_cap_hi);
+ set_migr_chkp_area_pba(migr_rec,
+ migr_chkp_area_pba(migr_rec) * IMSM_4K_DIV);
+ set_migr_dest_1st_member_lba(migr_rec,
+ migr_dest_1st_member_lba(migr_rec) * IMSM_4K_DIV);
}
void convert_from_4k(struct intel_super *super)
@@ -3096,7 +3165,7 @@ static int imsm_create_metadata_checkpoint_update(
return 0;
}
(*u)->type = update_general_migration_checkpoint;
- (*u)->curr_migr_unit = __le32_to_cpu(super->migr_rec->curr_migr_unit);
+ (*u)->curr_migr_unit = current_migr_unit(super->migr_rec);
dprintf("prepared for %u\n", (*u)->curr_migr_unit);
return update_memory_size;
@@ -3397,13 +3466,13 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
case MIGR_GEN_MIGR: {
__u64 blocks_per_unit = blocks_per_migr_unit(super,
dev);
- __u64 units = __le32_to_cpu(migr_rec->curr_migr_unit);
+ __u64 units = current_migr_unit(migr_rec);
unsigned long long array_blocks;
int used_disks;
if (__le32_to_cpu(migr_rec->ascending_migr) &&
(units <
- (__le32_to_cpu(migr_rec->num_migr_units)-1)) &&
+ (get_num_migr_units(migr_rec)-1)) &&
(super->migr_rec->rec_status ==
__cpu_to_le32(UNIT_SRC_IN_CP_AREA)))
units++;
@@ -10697,7 +10766,7 @@ void init_migr_record_imsm(struct supertype *st, struct imsm_dev *dev,
if (array_blocks % __le32_to_cpu(migr_rec->blocks_per_unit))
num_migr_units++;
- migr_rec->num_migr_units = __cpu_to_le32(num_migr_units);
+ set_num_migr_units(migr_rec, num_migr_units);
migr_rec->post_migr_vol_cap = dev->size_low;
migr_rec->post_migr_vol_cap_hi = dev->size_high;
@@ -10714,7 +10783,7 @@ void init_migr_record_imsm(struct supertype *st, struct imsm_dev *dev,
min_dev_sectors = dev_sectors;
close(fd);
}
- migr_rec->ckpt_area_pba = __cpu_to_le32(min_dev_sectors -
+ set_migr_chkp_area_pba(migr_rec, min_dev_sectors -
RAID_DISK_RESERVED_BLOCKS_IMSM_HI);
write_imsm_migr_rec(st);
@@ -10765,8 +10834,7 @@ int save_backup_imsm(struct supertype *st,
start = info->reshape_progress * 512;
for (i = 0; i < new_disks; i++) {
- target_offsets[i] = (unsigned long long)
- __le32_to_cpu(super->migr_rec->ckpt_area_pba) * 512;
+ target_offsets[i] = migr_chkp_area_pba(super->migr_rec) * 512;
/* move back copy area adderss, it will be moved forward
* in restore_stripes() using start input variable
*/
@@ -10845,12 +10913,11 @@ int save_checkpoint_imsm(struct supertype *st, struct mdinfo *info, int state)
if (info->reshape_progress % blocks_per_unit)
curr_migr_unit++;
- super->migr_rec->curr_migr_unit =
- __cpu_to_le32(curr_migr_unit);
+ set_current_migr_unit(super->migr_rec, curr_migr_unit);
super->migr_rec->rec_status = __cpu_to_le32(state);
- super->migr_rec->dest_1st_member_lba =
- __cpu_to_le32(curr_migr_unit *
- __le32_to_cpu(super->migr_rec->dest_depth_per_unit));
+ set_migr_dest_1st_member_lba(super->migr_rec,
+ super->migr_rec->dest_depth_per_unit * curr_migr_unit);
+
if (write_imsm_migr_rec(st) < 0) {
dprintf("imsm: Cannot write migration record outside backup area\n");
return 1;
@@ -10884,8 +10951,8 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
char *buf = NULL;
int retval = 1;
unsigned int sector_size = super->sector_size;
- unsigned long curr_migr_unit = __le32_to_cpu(migr_rec->curr_migr_unit);
- unsigned long num_migr_units = __le32_to_cpu(migr_rec->num_migr_units);
+ unsigned long curr_migr_unit = current_migr_unit(migr_rec);
+ unsigned long num_migr_units = get_num_migr_units(migr_rec);
char buffer[20];
int skipped_disks = 0;
@@ -10912,11 +10979,9 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
map_dest = get_imsm_map(id->dev, MAP_0);
new_disks = map_dest->num_members;
- read_offset = (unsigned long long)
- __le32_to_cpu(migr_rec->ckpt_area_pba) * 512;
+ read_offset = migr_chkp_area_pba(migr_rec) * 512;
- write_offset = ((unsigned long long)
- __le32_to_cpu(migr_rec->dest_1st_member_lba) +
+ write_offset = (migr_dest_1st_member_lba(migr_rec) +
pba_of_lba0(map_dest)) * 512;
unit_len = __le32_to_cpu(migr_rec->dest_depth_per_unit) * 512;
@@ -12019,12 +12084,12 @@ static int imsm_manage_reshape(
max_position = sra->component_size * ndata;
source_layout = imsm_level_to_layout(map_src->raid_level);
- while (__le32_to_cpu(migr_rec->curr_migr_unit) <
- __le32_to_cpu(migr_rec->num_migr_units)) {
+ while (current_migr_unit(migr_rec) <
+ get_num_migr_units(migr_rec)) {
/* current reshape position [blocks] */
unsigned long long current_position =
__le32_to_cpu(migr_rec->blocks_per_unit)
- * __le32_to_cpu(migr_rec->curr_migr_unit);
+ * current_migr_unit(migr_rec);
unsigned long long border;
/* Check that array hasn't become failed.
--
2.25.0
++++++ 0015-Fix-spelling-typos.patch ++++++
>From ebf3be9931f31df54df52b1821479e6a80a4d9c6 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <xnox(a)ubuntu.com>
Date: Tue, 15 Jan 2019 19:08:37 +0000
Subject: [PATCH] Fix spelling typos.
Git-commit: ebf3be9931f31df54df52b1821479e6a80a4d9c6
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Signed-off-by: Dimitri John Ledkov <xnox(a)ubuntu.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Assemble.c | 2 +-
Create.c | 2 +-
Grow.c | 6 +++---
super-ddf.c | 2 +-
super-intel.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 9f75c68..9f050c1 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -879,7 +879,7 @@ static int force_array(struct mdinfo *content,
current_events = devices[chosen_drive].i.events;
add_another:
if (c->verbose >= 0)
- pr_err("forcing event count in %s(%d) from %d upto %d\n",
+ pr_err("forcing event count in %s(%d) from %d up to %d\n",
devices[chosen_drive].devname,
devices[chosen_drive].i.disk.raid_disk,
(int)(devices[chosen_drive].i.events),
diff --git a/Create.c b/Create.c
index 04b1dfc..6f1b228 100644
--- a/Create.c
+++ b/Create.c
@@ -823,7 +823,7 @@ int Create(struct supertype *st, char *mddev,
}
bitmap_fd = open(s->bitmap_file, O_RDWR);
if (bitmap_fd < 0) {
- pr_err("weird: %s cannot be openned\n",
+ pr_err("weird: %s cannot be opened\n",
s->bitmap_file);
goto abort_locked;
}
diff --git a/Grow.c b/Grow.c
index 363b209..6d32661 100644
--- a/Grow.c
+++ b/Grow.c
@@ -446,7 +446,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
if (offset_setable) {
st->ss->getinfo_super(st, mdi, NULL);
if (sysfs_init(mdi, fd, NULL)) {
- pr_err("failed to intialize sysfs.\n");
+ pr_err("failed to initialize sysfs.\n");
free(mdi);
}
rv = sysfs_set_num_signed(mdi, NULL, "bitmap/location",
@@ -2178,7 +2178,7 @@ size_change_error:
memset(&info, 0, sizeof(info));
info.array = array;
if (sysfs_init(&info, fd, NULL)) {
- pr_err("failed to intialize sysfs.\n");
+ pr_err("failed to initialize sysfs.\n");
rv = 1;
goto release;
}
@@ -2903,7 +2903,7 @@ static int impose_level(int fd, int level, char *devname, int verbose)
struct mdinfo info;
if (sysfs_init(&info, fd, NULL)) {
- pr_err("failed to intialize sysfs.\n");
+ pr_err("failed to initialize sysfs.\n");
return 1;
}
diff --git a/super-ddf.c b/super-ddf.c
index 618542c..c095e8a 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1900,7 +1900,7 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
return conf;
}
bad:
- pr_err("Could't find disk %d in array %u\n", n, inst);
+ pr_err("Couldn't find disk %d in array %u\n", n, inst);
return NULL;
}
diff --git a/super-intel.c b/super-intel.c
index 1cc7d5f..c399433 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10034,7 +10034,7 @@ static void imsm_process_update(struct supertype *st,
break;
}
default:
- pr_err("error: unsuported process update type:(type: %d)\n", type);
+ pr_err("error: unsupported process update type:(type: %d)\n", type);
}
}
--
2.25.0
++++++ 0009-Detail.c-do-not-skip-first-character-when-calling-xs.patch -> 0016-Detail.c-do-not-skip-first-character-when-calling-xs.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/mdadm/0009-Detail.c-do-not-skip-first-character-when-calling-xs.patch 2020-01-15 15:28:44.498687874 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.mdadm.new.3606/0016-Detail.c-do-not-skip-first-character-when-calling-xs.patch 2020-05-31 13:45:27.797626086 +0200
@@ -1,9 +1,10 @@
-From 02acb5718a68b16def418699c6afcc84223f52c7 Mon Sep 17 00:00:00 2001
+From e3615ecb5b6ad8eb408296878aad5628e0e27166 Mon Sep 17 00:00:00 2001
From: Coly Li <colyli(a)suse.de>
-Date: Tue, 12 Feb 2019 12:43:40 +0800
+Date: Tue, 12 Feb 2019 12:53:18 +0800
Subject: [PATCH] Detail.c: do not skip first character when calling xstrdup in
Detail()
-Git-commit: Posted but not upstreamed yet
+Git-commit: e3615ecb5b6ad8eb408296878aad5628e0e27166
+Patch-mainline: mdadm-4.1+
References: bsc#1123814
'Commit b9c9bd9bacaa ("Detail: ensure --export names are acceptable as
@@ -25,6 +26,7 @@
Fixes: b9c9bd9bacaa ("Detail: ensure --export names are acceptable as 4 shell variables")
Signed-off-by: Coly Li <colyli(a)suse.de>
Cc: NeilBrown <neilb(a)suse.com>
+Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
Detail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -43,5 +45,5 @@
path = map_dev(mdi->disk.major,
--
-2.16.4
+2.25.0
++++++ 0018-Fix-reshape-for-decreasing-data-offset.patch ++++++
>From cab114c5ca870e5f1b57fb2602cd9a038271c2e0 Mon Sep 17 00:00:00 2001
From: Corey Hickey <bugfood-c(a)fatooh.org>
Date: Mon, 11 Feb 2019 17:18:38 -0800
Subject: [PATCH] Fix reshape for decreasing data offset
Git-commit: cab114c5ca870e5f1b57fb2602cd9a038271c2e0
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
...when not changing the number of disks.
This patch needs context to explain. These are the relevant parts of
the original code (condensed and annotated):
if (dir > 0) {
/* Increase data offset (reshape backwards) */
if (data_offset < sd->data_offset + min) {
pr_err("--data-offset too small on %s\n",
dn);
goto release;
}
} else {
/* Decrease data offset (reshape forwards) */
if (data_offset < sd->data_offset - min) {
pr_err("--data-offset too small on %s\n",
dn);
goto release;
}
}
When this code is reached, mdadm has already decided on a reshape
direction. When increasing the data offset, the reshape runs backwards
(dir==1); when decreasing the data offset, the reshape runs forwards
(dir==-1).
The conditional within the backwards reshape is correct: the requested
offset must be larger than the old offset plus a minimum delta; thus the
reshape has room to work.
For the forwards reshape, the requested offset needs to be smaller than
the old offset minus a minimum delta; to do this correctly, the
comparison must be reversed.
Also update the error message.
Note: I have tested this change on a RAID 5 on Linux 4.18.0 and verified
that there were no errors from the kernel and that the device data
remained intact. I do not know if there are considerations for different
RAID levels.
Signed-off-by: Corey Hickey <bugfood-c(a)fatooh.org>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Grow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Grow.c b/Grow.c
index 6d32661..764374f 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2613,8 +2613,8 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
goto release;
}
if (data_offset != INVALID_SECTORS &&
- data_offset < sd->data_offset - min) {
- pr_err("--data-offset too small on %s\n",
+ data_offset > sd->data_offset - min) {
+ pr_err("--data-offset too large on %s\n",
dn);
goto release;
}
--
2.25.0
++++++ 0019-mdadm-tests-add-one-test-case-for-failfast-of-raid1.patch ++++++
>From 76b906d2406cdf136f64de77e881eb2d180108d9 Mon Sep 17 00:00:00 2001
From: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
Date: Fri, 7 Dec 2018 14:30:09 +0100
Subject: [PATCH] mdadm/tests: add one test case for failfast of raid1
Git-commit: 76b906d2406cdf136f64de77e881eb2d180108d9
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
This creates raid1 device with the failfast option and check all
slaves have the failfast flag. And it does assembling and growing
the raid1 device and check the failfast works fine.
Signed-off-by: Gioh Kim <gi-oh.kim(a)cloud.ionos.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
tests/05r1-failfast | 74 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 tests/05r1-failfast
diff --git a/tests/05r1-failfast b/tests/05r1-failfast
new file mode 100644
index 0000000..823dd6f
--- /dev/null
+++ b/tests/05r1-failfast
@@ -0,0 +1,74 @@
+
+# create a simple mirror and check failfast flag works
+mdadm -CR $md0 -e1.2 --level=raid1 --failfast -n2 $dev0 $dev1
+check raid1
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
+then
+ die "failfast missing"
+fi
+
+# Removing works with the failfast flag
+mdadm $md0 -f $dev0
+mdadm $md0 -r $dev0
+if grep -v failfast /sys/block/md0/md/rd1/state > /dev/null
+then
+ die "failfast missing"
+fi
+
+# Adding works with the failfast flag
+mdadm $md0 -a --failfast $dev0
+check wait
+if grep -v failfast /sys/block/md0/md/rd0/state > /dev/null
+then
+ die "failfast missing"
+fi
+
+mdadm -S $md0
+
+# Assembling works with the failfast flag
+mdadm -A $md0 $dev0 $dev1
+check raid1
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
+then
+ die "failfast missing"
+fi
+
+# Adding works with the nofailfast flag
+mdadm $md0 -f $dev0
+mdadm $md0 -r $dev0
+mdadm $md0 -a --nofailfast $dev0
+check wait
+if grep failfast /sys/block/md0/md/rd0/state > /dev/null
+then
+ die "failfast should be missing"
+fi
+
+# Assembling with one faulty slave works with the failfast flag
+mdadm $md0 -f $dev0
+mdadm $md0 -r $dev0
+mdadm -S $md0
+mdadm -A $md0 $dev0 $dev1
+check raid1
+mdadm -S $md0
+
+# Spare works with the failfast flag
+mdadm -CR $md0 -e1.2 --level=raid1 --failfast -n2 $dev0 $dev1
+check raid1
+mdadm $md0 -a --failfast $dev2
+check wait
+check spares 1
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
+then
+ die "failfast missing"
+fi
+
+# Grow works with the failfast flag
+mdadm -G $md0 --raid-devices=3
+check wait
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
+then
+ die "failfast missing"
+fi
+mdadm -S $md0
+
+exit 0
--
2.25.0
++++++ 0011-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch -> 0020-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch ++++++
++++++ 0021-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch ++++++
>From d2e11da4b7fd0453e942f43e4196dc63b3dbd708 Mon Sep 17 00:00:00 2001
From: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Date: Fri, 22 Feb 2019 13:30:27 +0100
Subject: [PATCH] mdmon: wait for previous mdmon to exit during takeover
Git-commit: d2e11da4b7fd0453e942f43e4196dc63b3dbd708
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Since the patch c76242c5("mdmon: get safe mode delay file descriptor
early"), safe_mode_dalay is set properly by initrd mdmon. But in some
cases with filesystem traffic since the very start of the system, it
might take a while to transit to clean state. Due to fact that new
mdmon does not wait for the old one to exit - it might happen that the
new one switches safe_mode_delay back to seconds, before old one exits.
As the result two mdmons are running concurrently on same array.
Wait for the old mdmon to exit by pinging it with SIGUSR1 signal, just
in case it is sleeping.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdmon.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/mdmon.c b/mdmon.c
index 0955fcc..ff985d2 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -171,6 +171,7 @@ static void try_kill_monitor(pid_t pid, char *devname, int sock)
int fd;
int n;
long fl;
+ int rv;
/* first rule of survival... don't off yourself */
if (pid == getpid())
@@ -201,9 +202,16 @@ static void try_kill_monitor(pid_t pid, char *devname, int sock)
fl &= ~O_NONBLOCK;
fcntl(sock, F_SETFL, fl);
n = read(sock, buf, 100);
- /* Ignore result, it is just the wait that
- * matters
- */
+
+ /* If there is I/O going on it might took some time to get to
+ * clean state. Wait for monitor to exit fully to avoid races.
+ * Ping it with SIGUSR1 in case that it is sleeping */
+ for (n = 0; n < 25; n++) {
+ rv = kill(pid, SIGUSR1);
+ if (rv < 0)
+ break;
+ usleep(200000);
+ }
}
void remove_pidfile(char *devname)
--
2.25.0
++++++ 0022-Assemble-Fix-starting-array-with-initial-reshape-che.patch ++++++
>From 2b57e4fe041d52ae29866c93a878a11c07223cff Mon Sep 17 00:00:00 2001
From: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Date: Fri, 22 Feb 2019 12:56:27 +0100
Subject: [PATCH] Assemble: Fix starting array with initial reshape checkpoint
Git-commit: 2b57e4fe041d52ae29866c93a878a11c07223cff
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
If array was stopped during reshape initialization,
there might be a "0" checkpoint recorded in metadata.
If array with such condition (reshape with position 0)
is passed to kernel - it will refuse to start such array.
Treat such array as normal during assemble, Grow_continue() will
reinitialize and start the reshape.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Assemble.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 9f050c1..420c7b3 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -2061,8 +2061,22 @@ int assemble_container_content(struct supertype *st, int mdfd,
spare, &c->backup_file, c->verbose) == 1)
return 1;
- err = sysfs_set_str(content, NULL,
- "array_state", "readonly");
+ if (content->reshape_progress == 0) {
+ /* If reshape progress is 0 - we are assembling the
+ * array that was stopped, before reshape has started.
+ * Array needs to be started as active, Grow_continue()
+ * will start the reshape.
+ */
+ sysfs_set_num(content, NULL, "reshape_position",
+ MaxSector);
+ err = sysfs_set_str(content, NULL,
+ "array_state", "active");
+ sysfs_set_num(content, NULL, "reshape_position", 0);
+ } else {
+ err = sysfs_set_str(content, NULL,
+ "array_state", "readonly");
+ }
+
if (err)
return 1;
--
2.25.0
++++++ 0023-add-missing-units-to-examine.patch ++++++
>From 227aeaa872d4898273cf87a4253898823d556c43 Mon Sep 17 00:00:00 2001
From: Corey Hickey <bugfood-c(a)fatooh.org>
Date: Mon, 11 Feb 2019 17:42:27 -0800
Subject: [PATCH] add missing units to --examine
Git-commit: 227aeaa872d4898273cf87a4253898823d556c43
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Within the output of "mdadm --examine", there are three sizes reported
on adjacent lines. For example:
$ sudo mdadm --examine /dev/md3
[...]
Avail Dev Size : 17580545024 (8383.06 GiB 9001.24 GB)
Array Size : 17580417024 (16765.99 GiB 18002.35 GB)
Used Dev Size : 11720278016 (5588.66 GiB 6000.78 GB)
[...]
This can be confusing, since the first and third line are in 512-byte
sectors, and the second is in KiB.
Add units to avoid ambiguity.
(I don't particularly like the "KiB" notation, but it is at least
unambiguous.)
Signed-off-by: Corey Hickey <bugfood-c(a)fatooh.org>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super1.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/super1.c b/super1.c
index 636a286..b85dc20 100644
--- a/super1.c
+++ b/super1.c
@@ -360,7 +360,7 @@ static void examine_super1(struct supertype *st, char *homehost)
printf(" Raid Level : %s\n", c?c:"-unknown-");
printf(" Raid Devices : %d\n", __le32_to_cpu(sb->raid_disks));
printf("\n");
- printf(" Avail Dev Size : %llu%s\n",
+ printf(" Avail Dev Size : %llu sectors%s\n",
(unsigned long long)__le64_to_cpu(sb->data_size),
human_size(__le64_to_cpu(sb->data_size)<<9));
if (__le32_to_cpu(sb->level) > 0) {
@@ -378,11 +378,11 @@ static void examine_super1(struct supertype *st, char *homehost)
if (ddsks) {
long long asize = __le64_to_cpu(sb->size);
asize = (asize << 9) * ddsks / ddsks_denom;
- printf(" Array Size : %llu%s\n",
+ printf(" Array Size : %llu KiB%s\n",
asize >> 10, human_size(asize));
}
if (sb->size != sb->data_size)
- printf(" Used Dev Size : %llu%s\n",
+ printf(" Used Dev Size : %llu sectors%s\n",
(unsigned long long)__le64_to_cpu(sb->size),
human_size(__le64_to_cpu(sb->size)<<9));
}
--
2.25.0
++++++ 0024-imsm-fix-spare-activation-for-old-matrix-arrays.patch ++++++
>From 05501181f18cdccdb0b3cec1d8cf59f0995504d7 Mon Sep 17 00:00:00 2001
From: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Date: Fri, 8 Mar 2019 12:19:11 +0100
Subject: [PATCH] imsm: fix spare activation for old matrix arrays
Git-commit: 05501181f18cdccdb0b3cec1d8cf59f0995504d7
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
During spare activation get_extents() calculates metadata reserved space based
on smallest active RAID member or it will take the defaults. Since patch
611d9529("imsm: change reserved space to 4MB") default is extended. If array
was created prior that patch, reserved space is smaller. In case of matrix
RAID - spare is activated in each array one-by-one, so it is spare for first
activation, but treated as "active" during second one.
In case of adding spare drive to old matrix RAID with the size the same as
already existing member drive the routine will take the defaults during second
run and mdmon will refuse to rebuild second volume, claiming that the drive
does not have enough free space.
Add parameter to get_extents(), so the during spare activation reserved space
is always based on smallest active drive - even if given drive is already
active in some other array of matrix RAID.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index c399433..5a7c9f8 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1313,7 +1313,8 @@ static unsigned long long per_dev_array_size(struct imsm_map *map)
return array_size;
}
-static struct extent *get_extents(struct intel_super *super, struct dl *dl)
+static struct extent *get_extents(struct intel_super *super, struct dl *dl,
+ int get_minimal_reservation)
{
/* find a list of used extents on the given physical device */
struct extent *rv, *e;
@@ -1325,7 +1326,7 @@ static struct extent *get_extents(struct intel_super *super, struct dl *dl)
* regardless of whether the OROM has assigned sectors from the
* IMSM_RESERVED_SECTORS region
*/
- if (dl->index == -1)
+ if (dl->index == -1 || get_minimal_reservation)
reservation = imsm_min_reserved_sectors(super);
else
reservation = MPB_SECTOR_CNT + IMSM_RESERVED_SECTORS;
@@ -1386,7 +1387,7 @@ static __u32 imsm_reserved_sectors(struct intel_super *super, struct dl *dl)
if (dl->index == -1)
return MPB_SECTOR_CNT;
- e = get_extents(super, dl);
+ e = get_extents(super, dl, 0);
if (!e)
return MPB_SECTOR_CNT + IMSM_RESERVED_SECTORS;
@@ -1478,7 +1479,7 @@ static __u32 imsm_min_reserved_sectors(struct intel_super *super)
return rv;
/* find last lba used by subarrays on the smallest active disk */
- e = get_extents(super, dl_min);
+ e = get_extents(super, dl_min, 0);
if (!e)
return rv;
for (i = 0; e[i].size; i++)
@@ -1519,7 +1520,7 @@ int get_spare_criteria_imsm(struct supertype *st, struct spare_criteria *c)
if (!dl)
return -EINVAL;
/* find last lba used by subarrays */
- e = get_extents(super, dl);
+ e = get_extents(super, dl, 0);
if (!e)
return -EINVAL;
for (i = 0; e[i].size; i++)
@@ -7203,7 +7204,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
pos = 0;
i = 0;
- e = get_extents(super, dl);
+ e = get_extents(super, dl, 0);
if (!e) continue;
do {
unsigned long long esize;
@@ -7261,7 +7262,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
}
/* retrieve the largest free space block */
- e = get_extents(super, dl);
+ e = get_extents(super, dl, 0);
maxsize = 0;
i = 0;
if (e) {
@@ -7359,7 +7360,7 @@ static int imsm_get_free_size(struct supertype *st, int raiddisks,
if (super->orom && dl->index < 0 && mpb->num_raid_devs)
continue;
- e = get_extents(super, dl);
+ e = get_extents(super, dl, 0);
if (!e)
continue;
for (i = 1; e[i-1].size; i++)
@@ -8846,7 +8847,7 @@ static struct dl *imsm_add_spare(struct intel_super *super, int slot,
/* Does this unused device have the requisite free space?
* It needs to be able to cover all member volumes
*/
- ex = get_extents(super, dl);
+ ex = get_extents(super, dl, 1);
if (!ex) {
dprintf("cannot get extents\n");
continue;
--
2.25.0
++++++ 0025-Create-Block-rounding-size-to-max.patch ++++++
>From 22dc741f63e6403d59c2c14f56fd4791265f9bbb Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Date: Mon, 1 Apr 2019 16:53:41 +0200
Subject: [PATCH] Create: Block rounding size to max
Git-commit: 22dc741f63e6403d59c2c14f56fd4791265f9bbb
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
When passed size is smaller than chunk, mdadm rounds it to 0 but 0 there
means max available space.
Block it for every metadata. Remove the same check from imsm routine.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Create.c | 23 ++++++++++++++++++++---
super-intel.c | 5 ++---
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/Create.c b/Create.c
index 6f1b228..292f92a 100644
--- a/Create.c
+++ b/Create.c
@@ -27,6 +27,18 @@
#include "md_p.h"
#include <ctype.h>
+static int round_size_and_verify(unsigned long long *size, int chunk)
+{
+ if (*size == 0)
+ return 0;
+ *size &= ~(unsigned long long)(chunk - 1);
+ if (*size == 0) {
+ pr_err("Size cannot be smaller than chunk.\n");
+ return 1;
+ }
+ return 0;
+}
+
static int default_layout(struct supertype *st, int level, int verbose)
{
int layout = UnSet;
@@ -248,11 +260,14 @@ int Create(struct supertype *st, char *mddev,
pr_err("unknown level %d\n", s->level);
return 1;
}
+
if (s->size == MAX_SIZE)
/* use '0' to mean 'max' now... */
s->size = 0;
if (s->size && s->chunk && s->chunk != UnSet)
- s->size &= ~(unsigned long long)(s->chunk - 1);
+ if (round_size_and_verify(&s->size, s->chunk))
+ return 1;
+
newsize = s->size * 2;
if (st && ! st->ss->validate_geometry(st, s->level, s->layout, s->raiddisks,
&s->chunk, s->size*2,
@@ -267,7 +282,8 @@ int Create(struct supertype *st, char *mddev,
/* default chunk was just set */
if (c->verbose > 0)
pr_err("chunk size defaults to %dK\n", s->chunk);
- s->size &= ~(unsigned long long)(s->chunk - 1);
+ if (round_size_and_verify(&s->size, s->chunk))
+ return 1;
do_default_chunk = 0;
}
}
@@ -413,7 +429,8 @@ int Create(struct supertype *st, char *mddev,
/* default chunk was just set */
if (c->verbose > 0)
pr_err("chunk size defaults to %dK\n", s->chunk);
- s->size &= ~(unsigned long long)(s->chunk - 1);
+ if (round_size_and_verify(&s->size, s->chunk))
+ return 1;
do_default_chunk = 0;
}
}
diff --git a/super-intel.c b/super-intel.c
index 5a7c9f8..2ba045a 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7455,9 +7455,8 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
verbose);
}
- if (size && ((size < 1024) || (*chunk != UnSet &&
- size < (unsigned long long) *chunk))) {
- pr_err("Given size must be greater than 1M and chunk size.\n");
+ if (size && (size < 1024)) {
+ pr_err("Given size must be greater than 1M.\n");
/* Depends on algorithm in Create.c :
* if container was given (dev == NULL) return -1,
* if block device was given ( dev != NULL) return 0.
--
2.25.0
++++++ 0026-udev-Add-udev-rules-to-create-by-partuuid-for-md-dev.patch ++++++
>From 3c9b46cf9ae15a9be98fc47e2080bd9494496246 Mon Sep 17 00:00:00 2001
From: Liwei Song <liwei.song(a)windriver.com>
Date: Tue, 19 Mar 2019 23:51:05 -0400
Subject: [PATCH] udev: Add udev rules to create by-partuuid for md device
Git-commit: 3c9b46cf9ae15a9be98fc47e2080bd9494496246
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
This rules will create link under /dev/disk/by-partuuid/ for
MD devices partition, with which will support specify
root=PARTUUID=XXX to boot rootfs.
Signed-off-by: Liwei Song <liwei.song(a)windriver.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
udev-md-raid-arrays.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
index c95ec7b..5b99d58 100644
--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -30,6 +30,7 @@ IMPORT{builtin}="blkid"
OPTIONS+="link_priority=100"
OPTIONS+="watch"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
--
2.25.0
++++++ 0027-mdmon-fix-wrong-array-state-when-disk-fails-during-m.patch ++++++
>From ae7d61e35ec2ab6361c3e509a8db00698ef3396f Mon Sep 17 00:00:00 2001
From: Artur Paszkiewicz <artur.paszkiewicz(a)intel.com>
Date: Tue, 7 May 2019 16:08:47 +0200
Subject: [PATCH] mdmon: fix wrong array state when disk fails during mdmon
startup
Git-commit: ae7d61e35ec2ab6361c3e509a8db00698ef3396f
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
If a member drive disappears and is set faulty by the kernel during
mdmon startup, after ss->load_container() but before manage_new(), mdmon
will try to readd the faulty drive to the array and start rebuilding.
Metadata on the active drive is updated, but the faulty drive is not
removed from the array and is left in a "blocked" state and any write
request to the array will block. If the faulty drive reappears in the
system e.g. after a reboot, the array will not assemble because metadata
on the drives will be incompatible (at least on imsm).
Fix this by adding a new option for sysfs_read(): "GET_DEVS_ALL". This
is an extension for the "GET_DEVS" option and causes all member devices
to be returned, even if the associated block device has been removed.
Use this option in manage_new() to include the faulty device on the
active_array's devices list. Mdmon will then properly remove the faulty
device from the array and update the metadata to reflect the degraded
state.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
managemon.c | 2 +-
mdadm.h | 1 +
super-intel.c | 2 +-
sysfs.c | 23 ++++++++++++++---------
4 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/managemon.c b/managemon.c
index 29b91ba..200cf83 100644
--- a/managemon.c
+++ b/managemon.c
@@ -678,7 +678,7 @@ static void manage_new(struct mdstat_ent *mdstat,
mdi = sysfs_read(-1, mdstat->devnm,
GET_LEVEL|GET_CHUNK|GET_DISKS|GET_COMPONENT|
GET_SAFEMODE|GET_DEVS|GET_OFFSET|GET_SIZE|GET_STATE|
- GET_LAYOUT);
+ GET_LAYOUT|GET_DEVS_ALL);
if (!mdi)
return;
diff --git a/mdadm.h b/mdadm.h
index 705bd9b..427cc52 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -647,6 +647,7 @@ enum sysfs_read_flags {
GET_ERROR = (1 << 24),
GET_ARRAY_STATE = (1 << 25),
GET_CONSISTENCY_POLICY = (1 << 26),
+ GET_DEVS_ALL = (1 << 27),
};
/* If fd >= 0, get the array it is open on,
diff --git a/super-intel.c b/super-intel.c
index 2ba045a..4fd5e84 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -8560,7 +8560,7 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
disk = get_imsm_disk(super, ord_to_idx(ord));
/* check for new failures */
- if (state & DS_FAULTY) {
+ if (disk && (state & DS_FAULTY)) {
if (mark_failure(super, dev, disk, ord_to_idx(ord)))
super->updates_pending++;
}
diff --git a/sysfs.c b/sysfs.c
index df6fdda..2dd9ab6 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -313,17 +313,22 @@ struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options)
/* assume this is a stale reference to a hot
* removed device
*/
- free(dev);
- continue;
+ if (!(options & GET_DEVS_ALL)) {
+ free(dev);
+ continue;
+ }
+ } else {
+ sscanf(buf, "%d:%d", &dev->disk.major, &dev->disk.minor);
}
- sscanf(buf, "%d:%d", &dev->disk.major, &dev->disk.minor);
- /* special case check for block devices that can go 'offline' */
- strcpy(dbase, "block/device/state");
- if (load_sys(fname, buf, sizeof(buf)) == 0 &&
- strncmp(buf, "offline", 7) == 0) {
- free(dev);
- continue;
+ if (!(options & GET_DEVS_ALL)) {
+ /* special case check for block devices that can go 'offline' */
+ strcpy(dbase, "block/device/state");
+ if (load_sys(fname, buf, sizeof(buf)) == 0 &&
+ strncmp(buf, "offline", 7) == 0) {
+ free(dev);
+ continue;
+ }
}
/* finally add this disk to the array */
--
2.25.0
++++++ 0028-Enable-probe_roms-to-scan-more-than-6-roms.patch ++++++
>From 4ec389e3f0c1233f5aa2d5b4e63d96e33d2a37f0 Mon Sep 17 00:00:00 2001
From: Roman Sobanski <roman.sobanski(a)intel.com>
Date: Tue, 2 Jul 2019 13:29:27 +0200
Subject: [PATCH] Enable probe_roms to scan more than 6 roms.
Git-commit: 4ec389e3f0c1233f5aa2d5b4e63d96e33d2a37f0
Patch-mainline: mdadm-4.1+
References: bsc#1156040
In some cases if more than 6 oroms exist, resource for particular
controller may not be found. Change method for storing
adapter_rom_resources from array to list.
Signed-off-by: Roman Sobanski <roman.sobanski(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Acked-by: Coly Li <colyli(a)suse.de>
---
probe_roms.c | 98 ++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 56 insertions(+), 42 deletions(-)
diff --git a/probe_roms.c b/probe_roms.c
index b0b0883..7ea04c7 100644
--- a/probe_roms.c
+++ b/probe_roms.c
@@ -35,6 +35,9 @@ static const int rom_len = 0xf0000 - 0xc0000; /* option-rom memory region */
static int _sigbus;
static unsigned long rom_align;
+static void roms_deinit(void);
+static int roms_init(void);
+
static void sigbus(int sig)
{
_sigbus = 1;
@@ -75,6 +78,7 @@ void probe_roms_exit(void)
munmap(rom_mem, rom_len);
rom_mem = MAP_FAILED;
}
+ roms_deinit();
}
int probe_roms_init(unsigned long align)
@@ -91,6 +95,9 @@ int probe_roms_init(unsigned long align)
else
return -1;
+ if (roms_init())
+ return -1;
+
if (signal(SIGBUS, sigbus) == SIG_ERR)
rc = -1;
if (rc == 0) {
@@ -131,6 +138,7 @@ struct resource {
unsigned long end;
unsigned long data;
const char *name;
+ struct resource *next;
};
static struct resource system_rom_resource = {
@@ -147,37 +155,7 @@ static struct resource extension_rom_resource = {
.end = 0xeffff,
};
-static struct resource adapter_rom_resources[] = { {
- .name = "Adapter ROM",
- .start = 0xc8000,
- .data = 0,
- .end = 0,
-}, {
- .name = "Adapter ROM",
- .start = 0,
- .data = 0,
- .end = 0,
-}, {
- .name = "Adapter ROM",
- .start = 0,
- .data = 0,
- .end = 0,
-}, {
- .name = "Adapter ROM",
- .start = 0,
- .data = 0,
- .end = 0,
-}, {
- .name = "Adapter ROM",
- .start = 0,
- .data = 0,
- .end = 0,
-}, {
- .name = "Adapter ROM",
- .start = 0,
- .data = 0,
- .end = 0,
-} };
+static struct resource *adapter_rom_resources;
static struct resource video_rom_resource = {
.name = "Video ROM",
@@ -186,8 +164,35 @@ static struct resource video_rom_resource = {
.end = 0xc7fff,
};
+static int roms_init(void)
+{
+ adapter_rom_resources = malloc(sizeof(struct resource));
+ if (adapter_rom_resources == NULL)
+ return 1;
+ adapter_rom_resources->name = "Adapter ROM";
+ adapter_rom_resources->start = 0xc8000;
+ adapter_rom_resources->data = 0;
+ adapter_rom_resources->end = 0;
+ adapter_rom_resources->next = NULL;
+ return 0;
+}
+
+static void roms_deinit(void)
+{
+ struct resource *res;
+
+ res = adapter_rom_resources;
+ while (res) {
+ struct resource *tmp = res;
+
+ res = res->next;
+ free(tmp);
+ }
+}
+
#define ROMSIGNATURE 0xaa55
+
static int romsignature(const unsigned char *rom)
{
const unsigned short * const ptr = (const unsigned short *)rom;
@@ -208,16 +213,14 @@ static int romchecksum(const unsigned char *rom, unsigned long length)
int scan_adapter_roms(scan_fn fn)
{
/* let scan_fn examing each of the adapter roms found by probe_roms */
- unsigned int i;
+ struct resource *res = adapter_rom_resources;
int found;
if (rom_fd < 0)
return 0;
found = 0;
- for (i = 0; i < ARRAY_SIZE(adapter_rom_resources); i++) {
- struct resource *res = &adapter_rom_resources[i];
-
+ while (res) {
if (res->start) {
found = fn(isa_bus_to_virt(res->start),
isa_bus_to_virt(res->end),
@@ -226,6 +229,7 @@ int scan_adapter_roms(scan_fn fn)
break;
} else
break;
+ res = res->next;
}
return found;
@@ -241,14 +245,14 @@ void probe_roms(void)
const void *rom;
unsigned long start, length, upper;
unsigned char c;
- unsigned int i;
+ struct resource *res = adapter_rom_resources;
__u16 val=0;
if (rom_fd < 0)
return;
/* video rom */
- upper = adapter_rom_resources[0].start;
+ upper = res->start;
for (start = video_rom_resource.start; start < upper; start += rom_align) {
rom = isa_bus_to_virt(start);
if (!romsignature(rom))
@@ -283,8 +287,9 @@ void probe_roms(void)
upper = extension_rom_resource.start;
}
+ struct resource *prev_res = res;
/* check for adapter roms on 2k boundaries */
- for (i = 0; i < ARRAY_SIZE(adapter_rom_resources) && start < upper; start += rom_align) {
+ for (; start < upper; start += rom_align) {
rom = isa_bus_to_virt(start);
if (!romsignature(rom))
continue;
@@ -308,10 +313,19 @@ void probe_roms(void)
if (!length || start + length > upper || !romchecksum(rom, length))
continue;
- adapter_rom_resources[i].start = start;
- adapter_rom_resources[i].data = start + (unsigned long) val;
- adapter_rom_resources[i].end = start + length - 1;
+ if (res == NULL) {
+ res = calloc(1, sizeof(struct resource));
+ if (res == NULL)
+ return;
+ prev_res->next = res;
+ }
+
+ res->start = start;
+ res->data = start + (unsigned long)val;
+ res->end = start + length - 1;
- start = adapter_rom_resources[i++].end & ~(rom_align - 1);
+ start = res->end & ~(rom_align - 1);
+ prev_res = res;
+ res = res->next;
}
}
--
2.16.4
++++++ 0029-super-intel-Fix-issue-with-abs-being-irrelevant.patch ++++++
>From a4f7290c20c2ff78328c9db0b18029165cfb05b2 Mon Sep 17 00:00:00 2001
From: Jes Sorensen <jsorensen(a)fb.com>
Date: Tue, 9 Jul 2019 13:26:08 -0400
Subject: [PATCH] super-intel: Fix issue with abs() being irrelevant
Git-commit: a4f7290c20c2ff78328c9db0b18029165cfb05b2
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
gcc9 complains about subtracting unsigned from unsigned and code
assuming the result can be negative.
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 4fd5e84..230e164 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2875,7 +2875,7 @@ static unsigned long long calc_component_size(struct imsm_map *map,
{
unsigned long long component_size;
unsigned long long dev_size = imsm_dev_size(dev);
- unsigned long long calc_dev_size = 0;
+ long long calc_dev_size = 0;
unsigned int member_disks = imsm_num_data_members(map);
if (member_disks == 0)
@@ -2889,7 +2889,7 @@ static unsigned long long calc_component_size(struct imsm_map *map,
* 2048 blocks per each device. If the difference is higher it means
* that array size was expanded and num_data_stripes was not updated.
*/
- if ((unsigned int)abs(calc_dev_size - dev_size) >
+ if (llabs(calc_dev_size - (long long)dev_size) >
(1 << SECT_PER_MB_SHIFT) * member_disks) {
component_size = dev_size / member_disks;
dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n",
--
2.25.0
++++++ 0030-mdadm.h-Introduced-unaligned-get-put-_unaligned-16-3.patch ++++++
>From 7039d1f8200b9599b23db5953934fdb43b0442e0 Mon Sep 17 00:00:00 2001
From: Jes Sorensen <jsorensen(a)fb.com>
Date: Tue, 9 Jul 2019 14:15:38 -0400
Subject: [PATCH] mdadm.h: Introduced unaligned {get,put}_unaligned{16,32}()
Git-commit: 7039d1f8200b9599b23db5953934fdb43b0442e0
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
We need these to avoid gcc9 going all crazy on us.
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdadm.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/mdadm.h b/mdadm.h
index 427cc52..0fa9e1b 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -191,6 +191,36 @@ struct dlm_lksb {
#endif
#endif /* __KLIBC__ */
+/*
+ * Partially stolen from include/linux/unaligned/packed_struct.h
+ */
+struct __una_u16 { __u16 x; } __attribute__ ((packed));
+struct __una_u32 { __u32 x; } __attribute__ ((packed));
+
+static inline __u16 __get_unaligned16(const void *p)
+{
+ const struct __una_u16 *ptr = (const struct __una_u16 *)p;
+ return ptr->x;
+}
+
+static inline __u32 __get_unaligned32(const void *p)
+{
+ const struct __una_u32 *ptr = (const struct __una_u32 *)p;
+ return ptr->x;
+}
+
+static inline void __put_unaligned16(__u16 val, void *p)
+{
+ struct __una_u16 *ptr = (struct __una_u16 *)p;
+ ptr->x = val;
+}
+
+static inline void __put_unaligned32(__u32 val, void *p)
+{
+ struct __una_u32 *ptr = (struct __una_u32 *)p;
+ ptr->x = val;
+}
+
/*
* Check at compile time that something is of a particular type.
* Always evaluates to 1 so you may use it easily in comparisons.
--
2.25.0
++++++ 0031-super-intel-Use-put_unaligned-in-split_ull.patch ++++++
>From 486720e0c2418e7e2e0a16221f7c42a308622254 Mon Sep 17 00:00:00 2001
From: Jes Sorensen <jsorensen(a)fb.com>
Date: Tue, 9 Jul 2019 14:49:22 -0400
Subject: [PATCH] super-intel: Use put_unaligned in split_ull
Git-commit: 486720e0c2418e7e2e0a16221f7c42a308622254
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Shut up some gcc9 errors by using put_unaligned() accessors. Not pretty,
but better than it was.
Also correct to the correct swap macros.
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 230e164..d7e8a65 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1165,12 +1165,12 @@ static int count_memberships(struct dl *dl, struct intel_super *super)
static __u32 imsm_min_reserved_sectors(struct intel_super *super);
-static int split_ull(unsigned long long n, __u32 *lo, __u32 *hi)
+static int split_ull(unsigned long long n, void *lo, void *hi)
{
if (lo == 0 || hi == 0)
return 1;
- *lo = __le32_to_cpu((unsigned)n);
- *hi = __le32_to_cpu((unsigned)(n >> 32));
+ __put_unaligned32(__cpu_to_le32((__u32)n), lo);
+ __put_unaligned32(__cpu_to_le32((n >> 32)), hi);
return 0;
}
--
2.25.0
++++++ 0032-mdadm-load-default-sysfs-attributes-after-assemblati.patch ++++++
>From b06815989179e0f153e44e4336290e655edce9a1 Mon Sep 17 00:00:00 2001
From: Mariusz Dabrowski <mariusz.dabrowski(a)intel.com>
Date: Wed, 10 Jul 2019 13:38:53 +0200
Subject: [PATCH] mdadm: load default sysfs attributes after assemblation
Git-commit: b06815989179e0f153e44e4336290e655edce9a1
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Added new type of line to mdadm.conf which allows to specify values of
sysfs attributes for MD devices that should be loaded after the array is
assembled. Each line is interpreted as list of structures containing
sysname of MD device (md126 etc.) and list of sysfs attributes and their
values.
Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski(a)intel.com>
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Assemble.c | 12 +++-
Incremental.c | 1 +
config.c | 7 ++-
mdadm.conf.5 | 25 ++++++++
mdadm.h | 3 +
sysfs.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 202 insertions(+), 4 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 420c7b3..b2e6914 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1063,9 +1063,12 @@ static int start_array(int mdfd,
mddev, okcnt + sparecnt + journalcnt,
okcnt + sparecnt + journalcnt == 1 ? "" : "s");
if (okcnt < (unsigned)content->array.raid_disks)
- fprintf(stderr, " (out of %d)",
+ fprintf(stderr, " (out of %d)\n",
content->array.raid_disks);
- fprintf(stderr, "\n");
+ else {
+ fprintf(stderr, "\n");
+ sysfs_rules_apply(mddev, content);
+ }
}
if (st->ss->validate_container) {
@@ -1139,6 +1142,7 @@ static int start_array(int mdfd,
rv = ioctl(mdfd, RUN_ARRAY, NULL);
reopen_mddev(mdfd); /* drop O_EXCL */
if (rv == 0) {
+ sysfs_rules_apply(mddev, content);
if (c->verbose >= 0) {
pr_err("%s has been started with %d drive%s",
mddev, okcnt, okcnt==1?"":"s");
@@ -2130,10 +2134,12 @@ int assemble_container_content(struct supertype *st, int mdfd,
pr_err("array %s now has %d device%s",
chosen_name, working + preexist,
working + preexist == 1 ? "":"s");
- else
+ else {
+ sysfs_rules_apply(chosen_name, content);
pr_err("Started %s with %d device%s",
chosen_name, working + preexist,
working + preexist == 1 ? "":"s");
+ }
if (preexist)
fprintf(stderr, " (%d new)", working);
if (expansion)
diff --git a/Incremental.c b/Incremental.c
index d4d3c35..98dbcd9 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -480,6 +480,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
pr_err("container %s now has %d device%s\n",
chosen_name, info.array.working_disks,
info.array.working_disks == 1?"":"s");
+ sysfs_rules_apply(chosen_name, &info);
wait_for(chosen_name, mdfd);
if (st->ss->external)
strcpy(devnm, fd2devnm(mdfd));
diff --git a/config.c b/config.c
index e14eae0..7592b2d 100644
--- a/config.c
+++ b/config.c
@@ -80,7 +80,8 @@ char DefaultAltConfFile[] = CONFFILE2;
char DefaultAltConfDir[] = CONFFILE2 ".d";
enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev,
- Homehost, HomeCluster, AutoMode, Policy, PartPolicy, LTEnd };
+ Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs,
+ LTEnd };
char *keywords[] = {
[Devices] = "devices",
[Array] = "array",
@@ -93,6 +94,7 @@ char *keywords[] = {
[AutoMode] = "auto",
[Policy] = "policy",
[PartPolicy]="part-policy",
+ [Sysfs] = "sysfs",
[LTEnd] = NULL
};
@@ -764,6 +766,9 @@ void conf_file(FILE *f)
case PartPolicy:
policyline(line, rule_part);
break;
+ case Sysfs:
+ sysfsline(line);
+ break;
default:
pr_err("Unknown keyword %s\n", line);
}
diff --git a/mdadm.conf.5 b/mdadm.conf.5
index 47c962a..27dbab1 100644
--- a/mdadm.conf.5
+++ b/mdadm.conf.5
@@ -587,6 +587,26 @@ be based on the domain, but with
appended, when N is the partition number for the partition that was
found.
+.TP
+.B SYSFS
+The SYSFS line lists custom values of MD device's sysfs attributes which will be
+stored in sysfs after the array is assembled. Multiple lines are allowed and each
+line has to contain the uuid or the name of the device to which it relates.
+.RS 4
+.TP
+.B uuid=
+hexadecimal identifier of MD device. This has to match the uuid stored in the
+superblock.
+.TP
+.B name=
+name of the MD device as was given to
+.I mdadm
+when the array was created. It will be ignored if
+.B uuid
+is not empty.
+.TP
+.RS 7
+
.SH EXAMPLE
DEVICE /dev/sd[bcdjkl]1
.br
@@ -657,6 +677,11 @@ CREATE group=system mode=0640 auto=part\-8
HOMEHOST <system>
.br
AUTO +1.x homehost \-all
+.br
+SYSFS name=/dev/md/raid5 group_thread_cnt=4 sync_speed_max=1000000
+.br
+SYSFS uuid=bead5eb6:31c17a27:da120ba2:7dfda40d group_thread_cnt=4
+sync_speed_max=1000000
.SH SEE ALSO
.BR mdadm (8),
diff --git a/mdadm.h b/mdadm.h
index 0fa9e1b..c36d7fd 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1322,6 +1322,9 @@ void domain_add(struct domainlist **domp, char *domain);
extern void policy_save_path(char *id_path, struct map_ent *array);
extern int policy_check_path(struct mdinfo *disk, struct map_ent *array);
+extern void sysfs_rules_apply(char *devnm, struct mdinfo *dev);
+extern void sysfsline(char *line);
+
#if __GNUC__ < 3
struct stat64;
#endif
diff --git a/sysfs.c b/sysfs.c
index 2dd9ab6..c313781 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -26,9 +26,22 @@
#include "mdadm.h"
#include <dirent.h>
#include <ctype.h>
+#include "dlink.h"
#define MAX_SYSFS_PATH_LEN 120
+struct dev_sysfs_rule {
+ struct dev_sysfs_rule *next;
+ char *devname;
+ int uuid[4];
+ int uuid_set;
+ struct sysfs_entry {
+ struct sysfs_entry *next;
+ char *name;
+ char *value;
+ } *entry;
+};
+
int load_sys(char *path, char *buf, int len)
{
int fd = open(path, O_RDONLY);
@@ -999,3 +1012,148 @@ int sysfs_wait(int fd, int *msec)
}
return n;
}
+
+int sysfs_rules_apply_check(const struct mdinfo *sra,
+ const struct sysfs_entry *ent)
+{
+ /* Check whether parameter is regular file,
+ * exists and is under specified directory.
+ */
+ char fname[MAX_SYSFS_PATH_LEN];
+ char dname[MAX_SYSFS_PATH_LEN];
+ char resolved_path[PATH_MAX];
+ char resolved_dir[PATH_MAX];
+
+ if (sra == NULL || ent == NULL)
+ return -1;
+
+ snprintf(dname, MAX_SYSFS_PATH_LEN, "/sys/block/%s/md/", sra->sys_name);
+ snprintf(fname, MAX_SYSFS_PATH_LEN, "%s/%s", dname, ent->name);
+
+ if (realpath(fname, resolved_path) == NULL ||
+ realpath(dname, resolved_dir) == NULL)
+ return -1;
+
+ if (strncmp(resolved_dir, resolved_path,
+ strnlen(resolved_dir, PATH_MAX)) != 0)
+ return -1;
+
+ return 0;
+}
+
+static struct dev_sysfs_rule *sysfs_rules;
+
+void sysfs_rules_apply(char *devnm, struct mdinfo *dev)
+{
+ struct dev_sysfs_rule *rules = sysfs_rules;
+
+ while (rules) {
+ struct sysfs_entry *ent = rules->entry;
+ int match = 0;
+
+ if (!rules->uuid_set) {
+ if (rules->devname)
+ match = strcmp(devnm, rules->devname) == 0;
+ } else {
+ match = memcmp(dev->uuid, rules->uuid,
+ sizeof(int[4])) == 0;
+ }
+
+ while (match && ent) {
+ if (sysfs_rules_apply_check(dev, ent) < 0)
+ pr_err("SYSFS: failed to write '%s' to '%s'\n",
+ ent->value, ent->name);
+ else
+ sysfs_set_str(dev, NULL, ent->name, ent->value);
+ ent = ent->next;
+ }
+ rules = rules->next;
+ }
+}
+
+static void sysfs_rule_free(struct dev_sysfs_rule *rule)
+{
+ struct sysfs_entry *entry;
+
+ while (rule) {
+ struct dev_sysfs_rule *tmp = rule->next;
+
+ entry = rule->entry;
+ while (entry) {
+ struct sysfs_entry *tmp = entry->next;
+
+ free(entry->name);
+ free(entry->value);
+ free(entry);
+ entry = tmp;
+ }
+
+ if (rule->devname)
+ free(rule->devname);
+ free(rule);
+ rule = tmp;
+ }
+}
+
+void sysfsline(char *line)
+{
+ struct dev_sysfs_rule *sr;
+ char *w;
+
+ sr = xcalloc(1, sizeof(*sr));
+ for (w = dl_next(line); w != line ; w = dl_next(w)) {
+ if (strncasecmp(w, "name=", 5) == 0) {
+ char *devname = w + 5;
+
+ if (strncmp(devname, "/dev/md/", 8) == 0) {
+ if (sr->devname)
+ pr_err("Only give one device per SYSFS line: %s\n",
+ devname);
+ else
+ sr->devname = xstrdup(devname);
+ } else {
+ pr_err("%s is an invalid name for an md device - ignored.\n",
+ devname);
+ }
+ } else if (strncasecmp(w, "uuid=", 5) == 0) {
+ char *uuid = w + 5;
+
+ if (sr->uuid_set) {
+ pr_err("Only give one uuid per SYSFS line: %s\n",
+ uuid);
+ } else {
+ if (parse_uuid(w + 5, sr->uuid) &&
+ memcmp(sr->uuid, uuid_zero,
+ sizeof(int[4])) != 0)
+ sr->uuid_set = 1;
+ else
+ pr_err("Invalid uuid: %s\n", uuid);
+ }
+ } else {
+ struct sysfs_entry *prop;
+
+ char *sep = strchr(w, '=');
+
+ if (sep == NULL || *(sep + 1) == 0) {
+ pr_err("Cannot parse \"%s\" - ignoring.\n", w);
+ continue;
+ }
+
+ prop = xmalloc(sizeof(*prop));
+ prop->value = xstrdup(sep + 1);
+ *sep = 0;
+ prop->name = xstrdup(w);
+ prop->next = sr->entry;
+ sr->entry = prop;
+ }
+ }
+
+ if (!sr->devname && !sr->uuid_set) {
+ pr_err("Device name not found in sysfs config entry - ignoring.\n");
+ sysfs_rule_free(sr);
+ return;
+ }
+
+ sr->next = sysfs_rules;
+ sysfs_rules = sr;
+}
--
2.25.0
++++++ 0033-mdadm.h-include-sysmacros.h-unconditionally.patch ++++++
>From 452dc4d13a012cdcb05088c0dbc699959c4d6c73 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch(a)tkos.co.il>
Date: Tue, 6 Aug 2019 16:05:23 +0300
Subject: [PATCH] mdadm.h: include sysmacros.h unconditionally
Git-commit: 452dc4d13a012cdcb05088c0dbc699959c4d6c73
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
musl libc now also requires sys/sysmacros.h for the major/minor macros.
All supported libc implementations carry sys/sysmacros.h, including
diet-libc, klibc, and uclibc-ng.
Cc: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: Baruch Siach <baruch(a)tkos.co.il>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdadm.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/mdadm.h b/mdadm.h
index c36d7fd..d61a9ca 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -45,10 +45,8 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#include <errno.h>
#include <string.h>
#include <syslog.h>
-#ifdef __GLIBC__
/* Newer glibc requires sys/sysmacros.h directly for makedev() */
#include <sys/sysmacros.h>
-#endif
#ifdef __dietlibc__
#include <strings.h>
/* dietlibc has deprecated random and srandom!! */
--
2.25.0
++++++ 0012-mdadm-add-no-devices-to-avoid-component-devices-deta.patch -> 0034-mdadm-add-no-devices-to-avoid-component-devices-deta.patch ++++++
++++++ 0013-udev-add-no-devices-option-for-calling-mdadm-detail.patch -> 0035-udev-add-no-devices-option-for-calling-mdadm-detail.patch ++++++
++++++ 0036-imsm-close-removed-drive-fd.patch ++++++
>From 91c97c5432028875db5f8abeddb5cb5f31902001 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Date: Mon, 15 Jul 2019 09:25:35 +0200
Subject: [PATCH] imsm: close removed drive fd.
Git-commit: 91c97c5432028875db5f8abeddb5cb5f31902001
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
When member drive fails, managemon prepares metadata update and adds
the drive to disk_mgmt_list with DISK_REMOVE flag. It fills only
minor and major. It is enough to recognize the device later.
Monitor thread while processing this update will remove the drive from
super only if it is a spare. It never removes failed member from
disks list. As a result, it still keeps opened descriptor to
non-existing device.
If removed drive is not a spare fill fd in disk_cfg structure
(prepared by managemon), monitor will close fd during freeing it.
Also set this drive fd to -1 in super to avoid double closing because
monitor will close the fd (if needed) while replacing removed drive
in array.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/super-intel.c b/super-intel.c
index d7e8a65..a103a3f 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -9200,6 +9200,9 @@ static int add_remove_disk_update(struct intel_super *super)
remove_disk_super(super,
disk_cfg->major,
disk_cfg->minor);
+ } else {
+ disk_cfg->fd = disk->fd;
+ disk->fd = -1;
}
}
/* release allocate disk structure */
--
2.25.0
++++++ 0037-mdadm-check-value-returned-by-snprintf-against-error.patch ++++++
>From fd5b09c9a9107f0393ce194c4aac6e7b8f163e85 Mon Sep 17 00:00:00 2001
From: Krzysztof Smolinski <krzysztof.smolinski(a)intel.com>
Date: Fri, 16 Aug 2019 11:06:17 +0200
Subject: [PATCH] mdadm: check value returned by snprintf against errors
Git-commit: fd5b09c9a9107f0393ce194c4aac6e7b8f163e85
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
GCC 8 checks possible truncation during snprintf more strictly
than GCC 7 which result in compilation errors. To fix this
problem checking result of snprintf against errors has been added.
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
sysfs.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sysfs.c b/sysfs.c
index c313781..2995713 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -1023,12 +1023,20 @@ int sysfs_rules_apply_check(const struct mdinfo *sra,
char dname[MAX_SYSFS_PATH_LEN];
char resolved_path[PATH_MAX];
char resolved_dir[PATH_MAX];
+ int result;
if (sra == NULL || ent == NULL)
return -1;
- snprintf(dname, MAX_SYSFS_PATH_LEN, "/sys/block/%s/md/", sra->sys_name);
- snprintf(fname, MAX_SYSFS_PATH_LEN, "%s/%s", dname, ent->name);
+ result = snprintf(dname, MAX_SYSFS_PATH_LEN,
+ "/sys/block/%s/md/", sra->sys_name);
+ if (result < 0 || result >= MAX_SYSFS_PATH_LEN)
+ return -1;
+
+ result = snprintf(fname, MAX_SYSFS_PATH_LEN,
+ "%s/%s", dname, ent->name);
+ if (result < 0 || result >= MAX_SYSFS_PATH_LEN)
+ return -1;
if (realpath(fname, resolved_path) == NULL ||
realpath(dname, resolved_dir) == NULL)
--
2.25.0
++++++ 0038-mdadm-Introduce-new-array-state-broken-for-raid0-lin.patch ++++++
>From 43ebc9105e9dafe5145b3e801c05da4736bf6e02 Mon Sep 17 00:00:00 2001
From: "Guilherme G. Piccoli" <gpiccoli(a)canonical.com>
Date: Tue, 3 Sep 2019 16:49:01 -0300
Subject: [PATCH] mdadm: Introduce new array state 'broken' for raid0/linear
Git-commit: 43ebc9105e9dafe5145b3e801c05da4736bf6e02
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Currently if a md raid0/linear array gets one or more members removed while
being mounted, kernel keeps showing state 'clean' in the 'array_state'
sysfs attribute. Despite udev signaling the member device is gone, 'mdadm'
cannot issue the STOP_ARRAY ioctl successfully, given the array is mounted.
Nothing else hints that something is wrong (except that the removed devices
don't show properly in the output of mdadm 'detail' command). There is no
other property to be checked, and if user is not performing reads/writes
to the array, even kernel log is quiet and doesn't give a clue about the
missing member.
This patch is the mdadm counterpart of kernel new array state 'broken'.
The 'broken' state mimics the state 'clean' in every aspect, being useful
only to distinguish if an array has some member missing. All necessary
paths in mdadm were changed to deal with 'broken' state, and in case the
tool runs in a kernel that is not updated, it'll work normally, i.e., it
doesn't require the 'broken' state in order to work.
Also, this patch changes the way the array state is showed in the 'detail'
command (for raid0/linear only) - now it takes the 'array_state' sysfs
attribute into account instead of only rely in the MD_SB_CLEAN flag.
Cc: Jes Sorensen <jes.sorensen(a)gmail.com>
Cc: NeilBrown <neilb(a)suse.de>
Cc: Song Liu <songliubraving(a)fb.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli(a)canonical.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Detail.c | 14 ++++++++++++--
Monitor.c | 8 ++++++--
maps.c | 1 +
mdadm.h | 1 +
mdmon.h | 2 +-
monitor.c | 4 ++--
6 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/Detail.c b/Detail.c
index ad60434..3e61e37 100644
--- a/Detail.c
+++ b/Detail.c
@@ -81,6 +81,7 @@ int Detail(char *dev, struct context *c)
int external;
int inactive;
int is_container = 0;
+ char *arrayst;
if (fd < 0) {
pr_err("cannot open %s: %s\n",
@@ -485,9 +486,18 @@ int Detail(char *dev, struct context *c)
else
st = ", degraded";
+ if (array.state & (1 << MD_SB_CLEAN)) {
+ if ((array.level == 0) ||
+ (array.level == LEVEL_LINEAR))
+ arrayst = map_num(sysfs_array_states,
+ sra->array_state);
+ else
+ arrayst = "clean";
+ } else
+ arrayst = "active";
+
printf(" State : %s%s%s%s%s%s \n",
- (array.state & (1 << MD_SB_CLEAN)) ?
- "clean" : "active", st,
+ arrayst, st,
(!e || (e->percent < 0 &&
e->percent != RESYNC_PENDING &&
e->percent != RESYNC_DELAYED)) ?
diff --git a/Monitor.c b/Monitor.c
index 036103f..b527165 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -1055,8 +1055,11 @@ int Wait(char *dev)
}
}
+/* The state "broken" is used only for RAID0/LINEAR - it's the same as
+ * "clean", but used in case the array has one or more members missing.
+ */
static char *clean_states[] = {
- "clear", "inactive", "readonly", "read-auto", "clean", NULL };
+ "clear", "inactive", "readonly", "read-auto", "clean", "broken", NULL };
int WaitClean(char *dev, int verbose)
{
@@ -1116,7 +1119,8 @@ int WaitClean(char *dev, int verbose)
rv = read(state_fd, buf, sizeof(buf));
if (rv < 0)
break;
- if (sysfs_match_word(buf, clean_states) <= 4)
+ if (sysfs_match_word(buf, clean_states) <
+ (int)ARRAY_SIZE(clean_states) - 1)
break;
rv = sysfs_wait(state_fd, &delay);
if (rv < 0 && errno != EINTR)
diff --git a/maps.c b/maps.c
index 02a0474..49b7f2c 100644
--- a/maps.c
+++ b/maps.c
@@ -150,6 +150,7 @@ mapping_t sysfs_array_states[] = {
{ "read-auto", ARRAY_READ_AUTO },
{ "clean", ARRAY_CLEAN },
{ "write-pending", ARRAY_WRITE_PENDING },
+ { "broken", ARRAY_BROKEN },
{ NULL, ARRAY_UNKNOWN_STATE }
};
diff --git a/mdadm.h b/mdadm.h
index 43b07d5..c88ceab 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -373,6 +373,7 @@ struct mdinfo {
ARRAY_ACTIVE,
ARRAY_WRITE_PENDING,
ARRAY_ACTIVE_IDLE,
+ ARRAY_BROKEN,
ARRAY_UNKNOWN_STATE,
} array_state;
struct md_bb bb;
diff --git a/mdmon.h b/mdmon.h
index 818367c..b3d72ac 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -21,7 +21,7 @@
extern const char Name[];
enum array_state { clear, inactive, suspended, readonly, read_auto,
- clean, active, write_pending, active_idle, bad_word};
+ clean, active, write_pending, active_idle, broken, bad_word};
enum sync_action { idle, reshape, resync, recover, check, repair, bad_action };
diff --git a/monitor.c b/monitor.c
index 81537ed..e0d3be6 100644
--- a/monitor.c
+++ b/monitor.c
@@ -26,7 +26,7 @@
static char *array_states[] = {
"clear", "inactive", "suspended", "readonly", "read-auto",
- "clean", "active", "write-pending", "active-idle", NULL };
+ "clean", "active", "write-pending", "active-idle", "broken", NULL };
static char *sync_actions[] = {
"idle", "reshape", "resync", "recover", "check", "repair", NULL
};
@@ -476,7 +476,7 @@ static int read_and_act(struct active_array *a, fd_set *fds)
a->next_state = clean;
ret |= ARRAY_DIRTY;
}
- if (a->curr_state == clean) {
+ if ((a->curr_state == clean) || (a->curr_state == broken)) {
a->container->ss->set_array_state(a, 1);
}
if (a->curr_state == active ||
--
2.25.0
++++++ 0039-mdadm-force-a-uuid-swap-on-big-endian.patch ++++++
>From 2c2d9c48d2daf0d78d20494c3779c0f6dc4bfa75 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon(a)redhat.com>
Date: Tue, 24 Sep 2019 11:39:24 -0400
Subject: [PATCH] mdadm: force a uuid swap on big endian
Git-commit: 2c2d9c48d2daf0d78d20494c3779c0f6dc4bfa75
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
The code path for metadata 0.90 calls a common routine
fname_from_uuid that uses metadata 1.2. The code expects member
swapuuid to be setup and usable. But it is only setup when using
metadata 1.2. Since the metadata 0.90 did not create swapuuid
and set it. The test (st->ss == &super1) ? 1 : st->ss->swapuuid
fails. The swapuuid is set at compile time based on byte order.
Any call based on metadata 0.90 and on big endian processors,
the --export uuid will be incorrect.
Signed-off-by: Nigel Croxon <ncroxon(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util.c b/util.c
index c26cf5f..64dd409 100644
--- a/util.c
+++ b/util.c
@@ -685,8 +685,12 @@ char *fname_from_uuid(struct supertype *st, struct mdinfo *info,
// work, but can't have it set if we want this printout to match
// all the other uuid printouts in super1.c, so we force swapuuid
// to 1 to make our printout match the rest of super1
+#if __BYTE_ORDER == BIG_ENDIAN
+ return __fname_from_uuid(info->uuid, 1, buf, sep);
+#else
return __fname_from_uuid(info->uuid, (st->ss == &super1) ? 1 :
st->ss->swapuuid, buf, sep);
+#endif
}
int check_ext2(int fd, char *name)
--
2.25.0
++++++ 0040-mdadm-md.4-add-the-descriptions-for-bitmap-sysfs-nod.patch ++++++
>From e53cb968691d9e40d83caf5570da3bb7b83c64e1 Mon Sep 17 00:00:00 2001
From: Guoqing Jiang <gqjiang(a)suse.com>
Date: Fri, 31 May 2019 10:10:00 +0800
Subject: [PATCH] mdadm/md.4: add the descriptions for bitmap sysfs nodes
Git-commit: e53cb968691d9e40d83caf5570da3bb7b83c64e1
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
The sysfs nodes under bitmap are not recorded in md.4,
add them based on md.rst and kernel source code.
Cc: NeilBrown <neilb(a)suse.com>
Signed-off-by: Guoqing Jiang <gqjiang(a)suse.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
md.4 | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/md.4 b/md.4
index 3a1d677..e86707a 100644
--- a/md.4
+++ b/md.4
@@ -1101,6 +1101,75 @@ stripe that requires some "prereading". For fairness this defaults to
maximizes sequential-write throughput at the cost of fairness to threads
doing small or random writes.
+.TP
+.B md/bitmap/backlog
+The value stored in the file only has any effect on RAID1 when write-mostly
+devices are active, and write requests to those devices are proceed in the
+background.
+
+This variable sets a limit on the number of concurrent background writes,
+the valid values are 0 to 16383, 0 means that write-behind is not allowed,
+while any other number means it can happen. If there are more write requests
+than the number, new writes will by synchronous.
+
+.TP
+.B md/bitmap/can_clear
+This is for externally managed bitmaps, where the kernel writes the bitmap
+itself, but metadata describing the bitmap is managed by mdmon or similar.
+
+When the array is degraded, bits mustn't be cleared. When the array becomes
+optimal again, bit can be cleared, but first the metadata needs to record
+the current event count. So md sets this to 'false' and notifies mdmon,
+then mdmon updates the metadata and writes 'true'.
+
+There is no code in mdmon to actually do this, so maybe it doesn't even
+work.
+
+.TP
+.B md/bitmap/chunksize
+The bitmap chunksize can only be changed when no bitmap is active, and
+the value should be power of 2 and at least 512.
+
+.TP
+.B md/bitmap/location
+This indicates where the write-intent bitmap for the array is stored.
+It can be "none" or "file" or a signed offset from the array metadata
+- measured in sectors. You cannot set a file by writing here - that can
+only be done with the SET_BITMAP_FILE ioctl.
+
+Write 'none' to 'bitmap/location' will clear bitmap, and the previous
+location value must be write to it to restore bitmap.
+
+.TP
+.B md/bitmap/max_backlog_used
+This keeps track of the maximum number of concurrent write-behind requests
+for an md array, writing any value to this file will clear it.
+
+.TP
+.B md/bitmap/metadata
+This can be 'internal' or 'clustered' or 'external'. 'internal' is set
+by default, which means the metadata for bitmap is stored in the first 256
+bytes of the bitmap space. 'clustered' means separate bitmap metadata are
+used for each cluster node. 'external' means that bitmap metadata is managed
+externally to the kernel.
+
+.TP
+.B md/bitmap/space
+This shows the space (in sectors) which is available at md/bitmap/location,
+and allows the kernel to know when it is safe to resize the bitmap to match
+a resized array. It should big enough to contain the total bytes in the bitmap.
+
+For 1.0 metadata, assume we can use up to the superblock if before, else
+to 4K beyond superblock. For other metadata versions, assume no change is
+possible.
+
+.TP
+.B md/bitmap/time_base
+This shows the time (in seconds) between disk flushes, and is used to looking
+for bits in the bitmap to be cleared.
+
+The default value is 5 seconds, and it should be an unsigned long value.
+
.SS KERNEL PARAMETERS
The md driver recognised several different kernel parameters.
--
2.25.0
++++++ 0041-Init-devlist-as-an-array.patch ++++++
>From 8063fd0f9e8abd718bd65928c19bc607cee5acd8 Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni(a)redhat.com>
Date: Mon, 30 Sep 2019 19:47:59 +0800
Subject: [PATCH] Init devlist as an array
Git-commit: 8063fd0f9e8abd718bd65928c19bc607cee5acd8
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
devlist is an string. It will change to an array if there is disk that
is sbd disk. If one device is sbd, it runs devlist=().
This line code changes devlist from a string to an array. If there is
no sbd device, it can't run this line code. So it will still be a string.
The later codes need an array, rather than an string. So init devlist
as an array to fix this problem.
Signed-off-by: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
clustermd_tests/func.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clustermd_tests/func.sh b/clustermd_tests/func.sh
index 642cc96..801d604 100644
--- a/clustermd_tests/func.sh
+++ b/clustermd_tests/func.sh
@@ -39,6 +39,9 @@ fetch_devlist()
devlist=($(ls /dev/disk/by-path/*$ISCSI_ID*))
fi
# sbd disk cannot use in testing
+ # Init devlist as an array
+ i=''
+ devlist=(${devlist[@]#$i})
for i in ${devlist[@]}
do
sbd -d $i dump &> /dev/null
--
2.25.0
++++++ 0042-Don-t-need-to-check-recovery-after-re-add-when-no-I-.patch ++++++
>From 611093148574164fcf4f24f8c076d09473f655d7 Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni(a)redhat.com>
Date: Mon, 30 Sep 2019 19:48:00 +0800
Subject: [PATCH] Don't need to check recovery after re-add when no I/O writes
to raid
Git-commit: 611093148574164fcf4f24f8c076d09473f655d7
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
If there is no write I/O between removing member disk and re-add it, there is no
recovery after re-adding member disk.
Signed-off-by: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
clustermd_tests/02r1_Manage_re-add | 2 --
1 file changed, 2 deletions(-)
diff --git a/clustermd_tests/02r1_Manage_re-add b/clustermd_tests/02r1_Manage_re-add
index dd9c416..d0d13e5 100644
--- a/clustermd_tests/02r1_Manage_re-add
+++ b/clustermd_tests/02r1_Manage_re-add
@@ -9,8 +9,6 @@ check all state UU
check all dmesg
mdadm --manage $md0 --fail $dev0 --remove $dev0
mdadm --manage $md0 --re-add $dev0
-check $NODE1 recovery
-check all wait
check all state UU
check all dmesg
stop_md all $md0
--
2.25.0
++++++ 0043-udev-allow-for-udev-attribute-reading-bug.patch ++++++
>From 7bd59e7926c6921121087eb067befaa896c900a4 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Wed, 18 Sep 2019 15:12:55 +1000
Subject: [PATCH] udev: allow for udev attribute reading bug.
Git-commit: 7bd59e7926c6921121087eb067befaa896c900a4
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
There is a bug in udev (which will hopefully get fixed, but
we should allow for it anways).
When reading a sysfs attribute, it first reads the whole
value of the attribute, then reads again expecting to get
a read of 0 bytes, like you would with an ordinary file.
If the sysfs attribute changed between these two reads, it can
get a mixture of two values.
In particular, if it reads when 'array_state' is changing from
'clear' to 'inactive', it can find the value as "clear\nve".
This causes the test for "|clear|active" to fail, so systemd is allowed
to think that the array is ready - when it isn't.
So change the pattern to allow for this but adding a wildcard at
the end.
Also don't allow for an empty string - reading array_state will
never return an empty string - if it exists at all, it will be
non-empty.
Signed-off-by: NeilBrown <neilb(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
udev-md-raid-arrays.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
index d391665..c8fa8e8 100644
--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -14,7 +14,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
# never leave state 'inactive'
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
-ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+ATTR{md/array_state}=="clear*|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
LABEL="md_ignore_state"
IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
--
2.25.0
++++++ 0044-imsm-save-current_vol-number.patch ++++++
>From b6180160f78f0182b296bdceed6419b26a6fccc7 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Date: Fri, 4 Oct 2019 12:07:28 +0200
Subject: [PATCH] imsm: save current_vol number
Git-commit: b6180160f78f0182b296bdceed6419b26a6fccc7
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
The imsm container_content routine will set curr_volume index in super
for getting volume information. This flag has never been restored to
original value, later other function may rely on it.
Restore this flag to original value.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/super-intel.c b/super-intel.c
index a103a3f..e02bbd7 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7826,6 +7826,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
int sb_errors = 0;
struct dl *d;
int spare_disks = 0;
+ int current_vol = super->current_vol;
/* do not assemble arrays when not all attributes are supported */
if (imsm_check_attributes(mpb->attributes) == 0) {
@@ -7993,6 +7994,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
rest = this;
}
+ super->current_vol = current_vol;
return rest;
}
--
2.25.0
++++++ 0045-imsm-allow-to-specify-second-volume-size.patch ++++++
>From 1a1ced1e2e64a6b4b349a3fb559f6b39e4cf7103 Mon Sep 17 00:00:00 2001
From: Krzysztof Smolinski <krzysztof.smolinski(a)intel.com>
Date: Fri, 8 Nov 2019 11:59:11 +0100
Subject: [PATCH] imsm: allow to specify second volume size
Git-commit: 1a1ced1e2e64a6b4b349a3fb559f6b39e4cf7103
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Removed checks which limited second volume size only to max value (the
largest size that fits on all current drives). It is now permitted
to create second volume with size lower then maximum possible.
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index e02bbd7..713058c 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7298,11 +7298,8 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
maxsize = merge_extents(super, i);
- if (!check_env("IMSM_NO_PLATFORM") &&
- mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
- return 0;
- }
+ if (mpb->num_raid_devs > 0 && size && size != maxsize)
+ pr_err("attempting to create a second volume with size less then remaining space.\n");
if (maxsize < size || maxsize == 0) {
if (verbose) {
@@ -7393,11 +7390,8 @@ static int imsm_get_free_size(struct supertype *st, int raiddisks,
}
maxsize = size;
}
- if (!check_env("IMSM_NO_PLATFORM") &&
- mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
- return 0;
- }
+ if (mpb->num_raid_devs > 0 && size && size != maxsize)
+ pr_err("attempting to create a second volume with size less then remaining space.\n");
cnt = 0;
for (dl = super->disks; dl; dl = dl->next)
if (dl->e)
--
2.25.0
++++++ 0046-mdcheck-when-mdcheck_start-is-enabled-enable-mdcheck.patch ++++++
>From 6636788aaf4ec0cacaefb6e77592e4a68e70a957 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Fri, 18 Oct 2019 11:10:34 +1100
Subject: [PATCH] mdcheck: when mdcheck_start is enabled, enable
mdcheck_continue too.
Git-commit: 6636788aaf4ec0cacaefb6e77592e4a68e70a957
Patch-mainline: mdadm-4.1+
References: bsc#1153258
mdcheck_continue continues a regular array scan that was started by
mdcheck_start.
mdcheck_start will ensure that mdcheck_continue is active.
Howver if you reboot after a check has started, but before it finishes,
then mdcheck_continue won't cause it to continue, because nothing
starts it on boot.
So add an install option for mdcheck_contine, and make sure it
gets enabled when mdcheck_start is enabled.
Signed-off-by: NeilBrown <neilb(a)suse.de>
---
systemd/mdcheck_continue.timer | 2 ++
systemd/mdcheck_start.timer | 1 +
2 files changed, 3 insertions(+)
diff --git a/systemd/mdcheck_continue.timer b/systemd/mdcheck_continue.timer
index 3ccfd7858a3f..dba1074c1f44 100644
--- a/systemd/mdcheck_continue.timer
+++ b/systemd/mdcheck_continue.timer
@@ -11,3 +11,5 @@ Description=MD array scrubbing - continuation
[Timer]
OnCalendar= 1:05:00
+[Install]
+WantedBy= mdmonitor.service
diff --git a/systemd/mdcheck_start.timer b/systemd/mdcheck_start.timer
index 64807362d649..9e7e02ab7333 100644
--- a/systemd/mdcheck_start.timer
+++ b/systemd/mdcheck_start.timer
@@ -13,3 +13,4 @@ OnCalendar=Sun *-*-1..7 1:00:00
[Install]
WantedBy= mdmonitor.service
+Also= mdcheck_continue.timer
--
2.23.0
++++++ 0050-mdcheck-use-to-pass-variable-to-mdcheck.patch ++++++
>From 4ca799c581703d4d0ad840833c037c2fff088ca7 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Wed, 30 Oct 2019 10:32:41 +1100
Subject: [PATCH] mdcheck: use ${} to pass variable to mdcheck
Git-commit: 4ca799c581703d4d0ad840833c037c2fff088ca7
Patch-mainline: mdadm-4.1+
References: bsc#1153258
$MDADM_CHECK_DURATION allows the value to be split on spaces.
${MDADM_CHECK_DURATION} avoids such splitting.
Making this change removes the need for double quoting when setting
the default Environment, and means that double quoting isn't needed
in the EnvironmentFile.
Signed-off-by: NeilBrown <neilb(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
systemd/mdcheck_continue.service | 5 ++---
systemd/mdcheck_start.service | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
index 592c607..deac695 100644
--- a/systemd/mdcheck_continue.service
+++ b/systemd/mdcheck_continue.service
@@ -11,8 +11,7 @@ ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_*
[Service]
Type=oneshot
-Environment= MDADM_CHECK_DURATION='"6 hours"'
+Environment= MDADM_CHECK_DURATION="6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
-ExecStart=/usr/share/mdadm/mdcheck --continue --duration $MDADM_CHECK_DURATION
-
+ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
index 812141b..f17f1aa 100644
--- a/systemd/mdcheck_start.service
+++ b/systemd/mdcheck_start.service
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer
[Service]
Type=oneshot
-Environment= MDADM_CHECK_DURATION='"6 hours"'
+Environment= MDADM_CHECK_DURATION="6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
-ExecStart=/usr/share/mdadm/mdcheck --duration $MDADM_CHECK_DURATION
+ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
--
2.25.0
++++++ 0051-SUSE-mdadm_env.sh-handle-MDADM_CHECK_DURATION.patch ++++++
>From 85b83a7920bca5b93d2458f093f2c640a130614c Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Wed, 30 Oct 2019 10:32:41 +1100
Subject: [PATCH] SUSE-mdadm_env.sh: handle MDADM_CHECK_DURATION
Git-commit: 85b83a7920bca5b93d2458f093f2c640a130614c
Patch-mainline: mdadm-4.1+
References: bsc#1153258
The suse sysconfig/mdadm allows MDADM_CHECK_DURATION
to be set, but it is currently ignored.
Signed-off-by: NeilBrown <neilb(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
systemd/SUSE-mdadm_env.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/systemd/SUSE-mdadm_env.sh b/systemd/SUSE-mdadm_env.sh
index 10b2e74..c13b48a 100644
--- a/systemd/SUSE-mdadm_env.sh
+++ b/systemd/SUSE-mdadm_env.sh
@@ -43,3 +43,6 @@ fi
mkdir -p /run/sysconfig
echo "MDADM_MONITOR_ARGS=$MDADM_RAIDDEVICES $MDADM_DELAY $MDADM_MAIL $MDADM_PROGRAM $MDADM_SCAN $MDADM_SEND_MAIL $MDADM_CONFIG" > /run/sysconfig/mdadm
+if [ -n "$MDADM_CHECK_DURATION" ]; then
+ echo "MDADM_CHECK_DURATION=$MDADM_CHECK_DURATION" >> /run/sysconfig/mdadm
+fi
--
2.25.0
++++++ 0052-super-intel-don-t-mark-structs-packed-unnecessarily.patch ++++++
>From 761e3bd9f5e3aafa95ad3ae50a637dc67c8774f0 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Thu, 31 Oct 2019 15:15:38 +1100
Subject: [PATCH] super-intel: don't mark structs 'packed' unnecessarily
Git-commit: 761e3bd9f5e3aafa95ad3ae50a637dc67c8774f0
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
super-intel marks a number of structures 'packed', but this
doesn't change the layout - they are already well organized.
This is a problem a gcc warns when code takes the address
of a field in a packet struct - as super-intel sometimes does.
So remove the marking where isn't needed.
Do ensure this does introduce a regression, add a compile-time
assertion that the size of the structure is exactly the value
it had before the 'packed' notation was removed.
Note that a couple of structure do need to be packed.
As the address of fields is never taken, that is safe.
Signed-off-by: NeilBrown <neilb(a)suse.de>
Acked-by: Artur Paszkiewicz <artur.paszkiewicz(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 713058c..a7fbed4 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -96,6 +96,19 @@
* mutliple PPL area
*/
+/*
+ * This macro let's us ensure that no-one accidentally
+ * changes the size of a struct
+ */
+#define ASSERT_SIZE(_struct, size) \
+static inline void __assert_size_##_struct(void) \
+{ \
+ switch (0) { \
+ case 0: break; \
+ case (sizeof(struct _struct) == size): break; \
+ } \
+}
+
/* Disk configuration info. */
#define IMSM_MAX_DEVICES 255
struct imsm_disk {
@@ -112,6 +125,7 @@ struct imsm_disk {
#define IMSM_DISK_FILLERS 3
__u32 filler[IMSM_DISK_FILLERS]; /* 0xF5 - 0x107 MPB_DISK_FILLERS for future expansion */
};
+ASSERT_SIZE(imsm_disk, 48)
/* map selector for map managment
*/
@@ -146,7 +160,8 @@ struct imsm_map {
__u32 disk_ord_tbl[1]; /* disk_ord_tbl[num_members],
* top byte contains some flags
*/
-} __attribute__ ((packed));
+};
+ASSERT_SIZE(imsm_map, 52)
struct imsm_vol {
__u32 curr_migr_unit;
@@ -169,7 +184,8 @@ struct imsm_vol {
__u32 filler[4];
struct imsm_map map[1];
/* here comes another one if migr_state */
-} __attribute__ ((packed));
+};
+ASSERT_SIZE(imsm_vol, 84)
struct imsm_dev {
__u8 volume[MAX_RAID_SERIAL_LEN];
@@ -220,7 +236,8 @@ struct imsm_dev {
#define IMSM_DEV_FILLERS 3
__u32 filler[IMSM_DEV_FILLERS];
struct imsm_vol vol;
-} __attribute__ ((packed));
+};
+ASSERT_SIZE(imsm_dev, 164)
struct imsm_super {
__u8 sig[MAX_SIGNATURE_LENGTH]; /* 0x00 - 0x1F */
@@ -248,7 +265,8 @@ struct imsm_super {
struct imsm_disk disk[1]; /* 0xD8 diskTbl[numDisks] */
/* here comes imsm_dev[num_raid_devs] */
/* here comes BBM logs */
-} __attribute__ ((packed));
+};
+ASSERT_SIZE(imsm_super, 264)
#define BBM_LOG_MAX_ENTRIES 254
#define BBM_LOG_MAX_LBA_ENTRY_VAL 256 /* Represents 256 LBAs */
@@ -269,7 +287,8 @@ struct bbm_log {
__u32 signature; /* 0xABADB10C */
__u32 entry_count;
struct bbm_log_entry marked_block_entries[BBM_LOG_MAX_ENTRIES];
-} __attribute__ ((__packed__));
+};
+ASSERT_SIZE(bbm_log, 2040)
static char *map_state_str[] = { "normal", "uninitialized", "degraded", "failed" };
@@ -323,7 +342,8 @@ struct migr_record {
* destination - high order 32 bits */
__u32 num_migr_units_hi; /* Total num migration units-of-op
* high order 32 bits */
-} __attribute__ ((__packed__));
+};
+ASSERT_SIZE(migr_record, 64)
struct md_list {
/* usage marker:
--
2.25.0
++++++ 0053-Manage-Remove-the-legacy-code-for-md-driver-prior-to.patch ++++++
>From 1cc3965d48deb0fb3e0657159c608ffb124643c1 Mon Sep 17 00:00:00 2001
From: Xiao Yang <ice_yangxiao(a)163.com>
Date: Wed, 27 Nov 2019 11:59:24 +0800
Subject: [PATCH] Manage: Remove the legacy code for md driver prior to 0.90.03
Git-commit: 1cc3965d48deb0fb3e0657159c608ffb124643c1
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Previous re-add operation only calls ioctl(HOT_ADD_DISK) for array without
metadata(e.g. mdadm -B/--build) when md driver is less than 0.90.02, but
commit 091e8e6 breaks the logic and current re-add operation can call
ioctl(HOT_ADD_DISK) even if md driver is 0.90.03.
This issue is reproduced by 05r1-re-add-nosuper:
Signed-off-by: Coly Li <colyli(a)suse.de>
------------------------------------------------
++ die 'resync or recovery is happening!'
++ echo -e '\n\tERROR: resync or recovery is happening! \n'
ERROR: resync or recovery is happening!
------------------------------------------------
Fixes: 091e8e6("Manage: Remove all references to md_get_version()")
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Xiao Yang <ice_yangxiao(a)163.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
Manage.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/Manage.c b/Manage.c
index 21536f5..ffe55f8 100644
--- a/Manage.c
+++ b/Manage.c
@@ -741,18 +741,6 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
" Adding anyway as --force was given.\n",
dv->devname, devname);
}
- if (!tst->ss->external && array->major_version == 0) {
- if (ioctl(fd, HOT_ADD_DISK, rdev)==0) {
- if (verbose >= 0)
- pr_err("hot added %s\n",
- dv->devname);
- return 1;
- }
-
- pr_err("hot add failed for %s: %s\n",
- dv->devname, strerror(errno));
- return -1;
- }
if (array->not_persistent == 0 || tst->ss->external) {
--
2.25.0
++++++ 0054-Remove-last-traces-of-HOT_ADD_DISK.patch ++++++
>From 02af379337c73e751ad97c0fed9123121f8b4289 Mon Sep 17 00:00:00 2001
From: Jes Sorensen <jsorensen(a)fb.com>
Date: Wed, 27 Nov 2019 10:19:54 -0500
Subject: [PATCH] Remove last traces of HOT_ADD_DISK
Git-commit: 02af379337c73e751ad97c0fed9123121f8b4289
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
This ioctl is no longer used, so remove all references to it.
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Manage.c | 2 --
md_u.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/Manage.c b/Manage.c
index ffe55f8..deeba2b 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1289,8 +1289,6 @@ int Manage_subdevs(char *devname, int fd,
/* Do something to each dev.
* devmode can be
* 'a' - add the device
- * try HOT_ADD_DISK
- * If that fails EINVAL, try ADD_NEW_DISK
* 'S' - add the device as a spare - don't try re-add
* 'j' - add the device as a journal device
* 'A' - re-add the device
diff --git a/md_u.h b/md_u.h
index 2d66d52..b30893c 100644
--- a/md_u.h
+++ b/md_u.h
@@ -28,7 +28,6 @@
#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t)
-#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
#define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29)
#define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int)
--
2.25.0
++++++ 0055-Fix-up-a-few-formatting-issues.patch ++++++
>From 9cf361f8791d86aaced821c19af556819bc03732 Mon Sep 17 00:00:00 2001
From: Jes Sorensen <jsorensen(a)fb.com>
Date: Wed, 27 Nov 2019 11:33:15 -0500
Subject: [PATCH] Fix up a few formatting issues
Git-commit: 9cf361f8791d86aaced821c19af556819bc03732
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Manage.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Manage.c b/Manage.c
index deeba2b..b22c396 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1728,8 +1728,10 @@ int move_spare(char *from_devname, char *to_devname, dev_t devid)
int fd2 = open(from_devname, O_RDONLY);
if (fd1 < 0 || fd2 < 0) {
- if (fd1>=0) close(fd1);
- if (fd2>=0) close(fd2);
+ if (fd1 >= 0)
+ close(fd1);
+ if (fd2 >= 0)
+ close(fd2);
return 0;
}
@@ -1743,7 +1745,8 @@ int move_spare(char *from_devname, char *to_devname, dev_t devid)
devlist.disposition = 'r';
if (Manage_subdevs(from_devname, fd2, &devlist, -1, 0, NULL, 0) == 0) {
devlist.disposition = 'a';
- if (Manage_subdevs(to_devname, fd1, &devlist, -1, 0, NULL, 0) == 0) {
+ if (Manage_subdevs(to_devname, fd1, &devlist, -1, 0,
+ NULL, 0) == 0) {
/* make sure manager is aware of changes */
ping_manager(to_devname);
ping_manager(from_devname);
@@ -1751,7 +1754,9 @@ int move_spare(char *from_devname, char *to_devname, dev_t devid)
close(fd2);
return 1;
}
- else Manage_subdevs(from_devname, fd2, &devlist, -1, 0, NULL, 0);
+ else
+ Manage_subdevs(from_devname, fd2, &devlist,
+ -1, 0, NULL, 0);
}
close(fd1);
close(fd2);
--
2.25.0
++++++ 0056-Remove-unused-code.patch ++++++
>From 4b31846f3f90aa24f883ceed80e91f204c0a9389 Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni(a)redhat.com>
Date: Fri, 29 Nov 2019 17:14:47 +0800
Subject: [PATCH] Remove unused code
Git-commit: 4b31846f3f90aa24f883ceed80e91f204c0a9389
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Signed-off-by: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
platform-intel.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/platform-intel.h b/platform-intel.h
index 29c85f1..7cb370e 100644
--- a/platform-intel.h
+++ b/platform-intel.h
@@ -169,7 +169,6 @@ static inline int fls(int x)
r -= 2;
}
if (!(x & 0x80000000u)) {
- x <<= 1;
r -= 1;
}
return r;
--
2.25.0
++++++ 0057-imsm-return-correct-uuid-for-volume-in-detail.patch ++++++
>From b771faef931c798a4553db0a8c1366aff90079c6 Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Fri, 29 Nov 2019 15:21:08 +0100
Subject: [PATCH] imsm: return correct uuid for volume in detail
Git-commit: b771faef931c798a4553db0a8c1366aff90079c6
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Fixes the side effect of the patch b6180160f ("imsm: save current_vol number")
- wrong UUID is printed in detail for each volume.
New parameter "subarray" is added to determine what info should be extracted
from metadata (subarray or container).
The parameter affects only IMSM metadata.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Detail.c | 4 ++--
mdadm.h | 5 +++--
super-ddf.c | 5 +++--
super-intel.c | 20 ++++++++++++++++++--
super0.c | 4 ++--
super1.c | 4 ++--
6 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/Detail.c b/Detail.c
index 3e61e37..24fa462 100644
--- a/Detail.c
+++ b/Detail.c
@@ -623,7 +623,7 @@ This is pretty boring
free_mdstat(ms);
if (st && st->sb)
- st->ss->detail_super(st, c->homehost);
+ st->ss->detail_super(st, c->homehost, subarray);
if (array.raid_disks == 0 && sra &&
sra->array.major_version == -1 &&
@@ -767,7 +767,7 @@ skip_devices_state:
if (spares && c->brief && array.raid_disks)
printf(" spares=%d", spares);
if (c->brief && st && st->sb)
- st->ss->brief_detail_super(st);
+ st->ss->brief_detail_super(st, subarray);
if (st)
st->ss->free_super(st);
diff --git a/mdadm.h b/mdadm.h
index c88ceab..91f1338 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -847,8 +847,9 @@ extern struct superswitch {
/* Used to report details of an active array.
* ->load_super was possibly given a 'component' string.
*/
- void (*detail_super)(struct supertype *st, char *homehost);
- void (*brief_detail_super)(struct supertype *st);
+ void (*detail_super)(struct supertype *st, char *homehost,
+ char *subarray);
+ void (*brief_detail_super)(struct supertype *st, char *subarray);
void (*export_detail_super)(struct supertype *st);
/* Optional: platform hardware / firmware details */
diff --git a/super-ddf.c b/super-ddf.c
index c095e8a..7802063 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1730,7 +1730,8 @@ err:
return 1;
}
-static void detail_super_ddf(struct supertype *st, char *homehost)
+static void detail_super_ddf(struct supertype *st, char *homehost,
+ char *subarray)
{
struct ddf_super *sb = st->sb;
int cnt = be16_to_cpu(sb->virt->populated_vdes);
@@ -1787,7 +1788,7 @@ static void uuid_of_ddf_subarray(const struct ddf_super *ddf,
memcpy(uuid, sha, 4*4);
}
-static void brief_detail_super_ddf(struct supertype *st)
+static void brief_detail_super_ddf(struct supertype *st, char *subarray)
{
struct mdinfo info;
char nbuf[64];
diff --git a/super-intel.c b/super-intel.c
index a7fbed4..86dcb69 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2183,23 +2183,39 @@ err:
return 1;
}
-static void detail_super_imsm(struct supertype *st, char *homehost)
+static void detail_super_imsm(struct supertype *st, char *homehost,
+ char *subarray)
{
struct mdinfo info;
char nbuf[64];
+ struct intel_super *super = st->sb;
+ int temp_vol = super->current_vol;
+
+ if (subarray)
+ super->current_vol = strtoul(subarray, NULL, 10);
getinfo_super_imsm(st, &info, NULL);
fname_from_uuid(st, &info, nbuf, ':');
printf("\n UUID : %s\n", nbuf + 5);
+
+ super->current_vol = temp_vol;
}
-static void brief_detail_super_imsm(struct supertype *st)
+static void brief_detail_super_imsm(struct supertype *st, char *subarray)
{
struct mdinfo info;
char nbuf[64];
+ struct intel_super *super = st->sb;
+ int temp_vol = super->current_vol;
+
+ if (subarray)
+ super->current_vol = strtoul(subarray, NULL, 10);
+
getinfo_super_imsm(st, &info, NULL);
fname_from_uuid(st, &info, nbuf, ':');
printf(" UUID=%s", nbuf + 5);
+
+ super->current_vol = temp_vol;
}
static int imsm_read_serial(int fd, char *devname, __u8 *serial);
diff --git a/super0.c b/super0.c
index 42989b9..6b7c0e3 100644
--- a/super0.c
+++ b/super0.c
@@ -348,7 +348,7 @@ err:
return 1;
}
-static void detail_super0(struct supertype *st, char *homehost)
+static void detail_super0(struct supertype *st, char *homehost, char *subarray)
{
mdp_super_t *sb = st->sb;
printf(" UUID : ");
@@ -368,7 +368,7 @@ static void detail_super0(struct supertype *st, char *homehost)
printf("\n Events : %d.%d\n\n", sb->events_hi, sb->events_lo);
}
-static void brief_detail_super0(struct supertype *st)
+static void brief_detail_super0(struct supertype *st, char *subarray)
{
mdp_super_t *sb = st->sb;
printf(" UUID=");
diff --git a/super1.c b/super1.c
index b85dc20..929466d 100644
--- a/super1.c
+++ b/super1.c
@@ -833,7 +833,7 @@ err:
return 1;
}
-static void detail_super1(struct supertype *st, char *homehost)
+static void detail_super1(struct supertype *st, char *homehost, char *subarray)
{
struct mdp_superblock_1 *sb = st->sb;
bitmap_super_t *bms = (bitmap_super_t*)(((char*)sb) + MAX_SB_SIZE);
@@ -857,7 +857,7 @@ static void detail_super1(struct supertype *st, char *homehost)
(unsigned long long)__le64_to_cpu(sb->events));
}
-static void brief_detail_super1(struct supertype *st)
+static void brief_detail_super1(struct supertype *st, char *subarray)
{
struct mdp_superblock_1 *sb = st->sb;
int i;
--
2.25.0
++++++ 0058-imsm-Change-the-way-of-printing-nvme-drives-in-detai.patch ++++++
>From 6da53c0e2aab200605722795798b1e4f2352cd64 Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Mon, 2 Dec 2019 10:52:05 +0100
Subject: [PATCH] imsm: Change the way of printing nvme drives in
detail-platform.
Git-commit: 6da53c0e2aab200605722795798b1e4f2352cd64
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Change NVMe controller path to device node path
in mdadm --detail-platform and print serial number.
The method imsm_read_serial always trimes serial to
MAX_RAID_SERIAL_LEN, added parameter 'serial_buf_len'
will be used to check the serial fit
to passed buffor, if not, will be trimed.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 97 ++++++++++++++++++++++++---------------------------
1 file changed, 46 insertions(+), 51 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 86dcb69..5c1f759 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2218,7 +2218,8 @@ static void brief_detail_super_imsm(struct supertype *st, char *subarray)
super->current_vol = temp_vol;
}
-static int imsm_read_serial(int fd, char *devname, __u8 *serial);
+static int imsm_read_serial(int fd, char *devname, __u8 *serial,
+ size_t serial_buf_len);
static void fd2devname(int fd, char *name);
static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_base, int verbose)
@@ -2364,8 +2365,9 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
else {
fd2devname(fd, buf);
printf(" Port%d : %s", port, buf);
- if (imsm_read_serial(fd, NULL, (__u8 *) buf) == 0)
- printf(" (%.*s)\n", MAX_RAID_SERIAL_LEN, buf);
+ if (imsm_read_serial(fd, NULL, (__u8 *)buf,
+ sizeof(buf)) == 0)
+ printf(" (%s)\n", buf);
else
printf(" ()\n");
close(fd);
@@ -2388,52 +2390,45 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
return err;
}
-static int print_vmd_attached_devs(struct sys_dev *hba)
+static int print_nvme_info(struct sys_dev *hba)
{
+ char buf[1024];
struct dirent *ent;
DIR *dir;
- char path[292];
- char link[256];
- char *c, *rp;
-
- if (hba->type != SYS_DEV_VMD)
- return 1;
+ char *rp;
+ int fd;
- /* scroll through /sys/dev/block looking for devices attached to
- * this hba
- */
- dir = opendir("/sys/bus/pci/drivers/nvme");
+ dir = opendir("/sys/block/");
if (!dir)
return 1;
for (ent = readdir(dir); ent; ent = readdir(dir)) {
- int n;
-
- /* is 'ent' a device? check that the 'subsystem' link exists and
- * that its target matches 'bus'
- */
- sprintf(path, "/sys/bus/pci/drivers/nvme/%s/subsystem",
- ent->d_name);
- n = readlink(path, link, sizeof(link));
- if (n < 0 || n >= (int)sizeof(link))
- continue;
- link[n] = '\0';
- c = strrchr(link, '/');
- if (!c)
- continue;
- if (strncmp("pci", c+1, strlen("pci")) != 0)
- continue;
-
- sprintf(path, "/sys/bus/pci/drivers/nvme/%s", ent->d_name);
-
- rp = realpath(path, NULL);
- if (!rp)
- continue;
+ if (strstr(ent->d_name, "nvme")) {
+ sprintf(buf, "/sys/block/%s", ent->d_name);
+ rp = realpath(buf, NULL);
+ if (!rp)
+ continue;
+ if (path_attached_to_hba(rp, hba->path)) {
+ fd = open_dev(ent->d_name);
+ if (fd < 0) {
+ free(rp);
+ continue;
+ }
- if (path_attached_to_hba(rp, hba->path)) {
- printf(" NVMe under VMD : %s\n", rp);
+ fd2devname(fd, buf);
+ if (hba->type == SYS_DEV_VMD)
+ printf(" NVMe under VMD : %s", buf);
+ else if (hba->type == SYS_DEV_NVME)
+ printf(" NVMe Device : %s", buf);
+ if (!imsm_read_serial(fd, NULL, (__u8 *)buf,
+ sizeof(buf)))
+ printf(" (%s)\n", buf);
+ else
+ printf("()\n");
+ close(fd);
+ }
+ free(rp);
}
- free(rp);
}
closedir(dir);
@@ -2648,7 +2643,7 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
char buf[PATH_MAX];
printf(" I/O Controller : %s (%s)\n",
vmd_domain_to_controller(hba, buf), get_sys_dev_type(hba->type));
- if (print_vmd_attached_devs(hba)) {
+ if (print_nvme_info(hba)) {
if (verbose > 0)
pr_err("failed to get devices attached to VMD domain.\n");
result |= 2;
@@ -2663,7 +2658,7 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
if (entry->type == SYS_DEV_NVME) {
for (hba = list; hba; hba = hba->next) {
if (hba->type == SYS_DEV_NVME)
- printf(" NVMe Device : %s\n", hba->path);
+ print_nvme_info(hba);
}
printf("\n");
continue;
@@ -4028,11 +4023,11 @@ static int nvme_get_serial(int fd, void *buf, size_t buf_len)
extern int scsi_get_serial(int fd, void *buf, size_t buf_len);
static int imsm_read_serial(int fd, char *devname,
- __u8 serial[MAX_RAID_SERIAL_LEN])
+ __u8 *serial, size_t serial_buf_len)
{
char buf[50];
int rv;
- int len;
+ size_t len;
char *dest;
char *src;
unsigned int i;
@@ -4075,13 +4070,13 @@ static int imsm_read_serial(int fd, char *devname,
len = dest - buf;
dest = buf;
- /* truncate leading characters */
- if (len > MAX_RAID_SERIAL_LEN) {
- dest += len - MAX_RAID_SERIAL_LEN;
- len = MAX_RAID_SERIAL_LEN;
+ if (len > serial_buf_len) {
+ /* truncate leading characters */
+ dest += len - serial_buf_len;
+ len = serial_buf_len;
}
- memset(serial, 0, MAX_RAID_SERIAL_LEN);
+ memset(serial, 0, serial_buf_len);
memcpy(serial, dest, len);
return 0;
@@ -4136,7 +4131,7 @@ load_imsm_disk(int fd, struct intel_super *super, char *devname, int keep_fd)
char name[40];
__u8 serial[MAX_RAID_SERIAL_LEN];
- rv = imsm_read_serial(fd, devname, serial);
+ rv = imsm_read_serial(fd, devname, serial, MAX_RAID_SERIAL_LEN);
if (rv != 0)
return 2;
@@ -5844,7 +5839,7 @@ int mark_spare(struct dl *disk)
return ret_val;
ret_val = 0;
- if (!imsm_read_serial(disk->fd, NULL, serial)) {
+ if (!imsm_read_serial(disk->fd, NULL, serial, MAX_RAID_SERIAL_LEN)) {
/* Restore disk serial number, because takeover marks disk
* as failed and adds to serial ':0' before it becomes
* a spare disk.
@@ -5895,7 +5890,7 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
dd->fd = fd;
dd->e = NULL;
dd->action = DISK_ADD;
- rv = imsm_read_serial(fd, devname, dd->serial);
+ rv = imsm_read_serial(fd, devname, dd->serial, MAX_RAID_SERIAL_LEN);
if (rv) {
pr_err("failed to retrieve scsi serial, aborting\n");
if (dd->devname)
--
2.25.0
++++++ 0059-Create-add-support-for-RAID0-layouts.patch ++++++
>From 329dfc28debb58ffe7bd1967cea00fc583139aca Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Mon, 4 Nov 2019 14:27:49 +1100
Subject: [PATCH] Create: add support for RAID0 layouts.
Git-commit: 329dfc28debb58ffe7bd1967cea00fc583139aca
Patch-mainline: mdadm-4.1+
References: bsc#1162479
Since Linux 5.4 a layout is needed for RAID0 arrays with
varying device sizes.
This patch makes the layout of an array visible (via --examine)
and sets the layout on newly created arrays.
--layout=dangerous
can be used to avoid setting a layout so that they array
can be used on older kernels.
Tested-by: dann frazier <dann.frazier(a)canonical.com>
Signed-off-by: NeilBrown <neilb(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
Create.c | 11 +++++++++++
Detail.c | 5 +++++
maps.c | 12 ++++++++++++
md.4 | 14 ++++++++++++++
mdadm.8.in | 30 +++++++++++++++++++++++++++++-
mdadm.c | 8 ++++++++
mdadm.h | 8 +++++++-
super0.c | 6 ++++++
super1.c | 30 +++++++++++++++++++++++++++++-
9 files changed, 121 insertions(+), 3 deletions(-)
diff --git a/Create.c b/Create.c
index 292f92a..6f84e5b 100644
--- a/Create.c
+++ b/Create.c
@@ -51,6 +51,9 @@ static int default_layout(struct supertype *st, int level, int verbose)
default: /* no layout */
layout = 0;
break;
+ case 0:
+ layout = RAID0_ORIG_LAYOUT;
+ break;
case 10:
layout = 0x102; /* near=2, far=1 */
if (verbose > 0)
@@ -950,6 +953,11 @@ int Create(struct supertype *st, char *mddev,
if (rv) {
pr_err("ADD_NEW_DISK for %s failed: %s\n",
dv->devname, strerror(errno));
+ if (errno == EINVAL &&
+ info.array.level == 0) {
+ pr_err("Possibly your kernel doesn't support RAID0 layouts.\n");
+ pr_err("Either upgrade, or use --layout=dangerous\n");
+ }
goto abort_locked;
}
break;
@@ -1046,6 +1054,9 @@ int Create(struct supertype *st, char *mddev,
if (ioctl(mdfd, RUN_ARRAY, ¶m)) {
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
+ if (errno == 524 /* ENOTSUP */ &&
+ info.array.level == 0)
+ cont_err("Please use --layout=original or --layout=alternate\n");
if (info.array.chunk_size & (info.array.chunk_size-1)) {
cont_err("Problem may be that chunk size is not a power of 2\n");
}
diff --git a/Detail.c b/Detail.c
index 24fa462..832485f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -525,6 +525,11 @@ int Detail(char *dev, struct context *c)
printf(" Layout : %s\n",
str ? str : "-unknown-");
}
+ if (array.level == 0 && array.layout) {
+ str = map_num(r0layout, array.layout);
+ printf(" Layout : %s\n",
+ str ? str : "-unknown-");
+ }
if (array.level == 6) {
str = map_num(r6layout, array.layout);
printf(" Layout : %s\n",
diff --git a/maps.c b/maps.c
index 49b7f2c..a4fd279 100644
--- a/maps.c
+++ b/maps.c
@@ -73,6 +73,18 @@ mapping_t r6layout[] = {
{ NULL, UnSet }
};
+/* raid0 layout is only needed because of a bug in 3.14 which changed
+ * the effective layout of raid0 arrays with varying device sizes.
+ */
+mapping_t r0layout[] = {
+ { "original", RAID0_ORIG_LAYOUT},
+ { "alternate", RAID0_ALT_MULTIZONE_LAYOUT},
+ { "1", 1}, /* aka ORIG */
+ { "2", 2}, /* aka ALT */
+ { "dangerous", 0},
+ { NULL, UnSet},
+};
+
mapping_t pers[] = {
{ "linear", LEVEL_LINEAR},
{ "raid0", 0},
diff --git a/md.4 b/md.4
index e86707a..6fe2755 100644
--- a/md.4
+++ b/md.4
@@ -193,6 +193,20 @@ smallest device has been exhausted, the RAID0 driver starts
collecting chunks into smaller stripes that only span the drives which
still have remaining space.
+A bug was introduced in linux 3.14 which changed the layout of blocks in
+a RAID0 beyond the region that is striped over all devices. This bug
+does not affect an array with all devices the same size, but can affect
+other RAID0 arrays.
+
+Linux 5.4 (and some stable kernels to which the change was backported)
+will not normally assemble such an array as it cannot know which layout
+to use. There is a module parameter "raid0.default_layout" which can be
+set to "1" to force the kernel to use the pre-3.14 layout or to "2" to
+force it to use the 3.14-and-later layout. when creating a new RAID0
+array,
+.I mdadm
+will record the chosen layout in the metadata in a way that allows newer
+kernels to assemble the array without needing a module parameter.
.SS RAID1
diff --git a/mdadm.8.in b/mdadm.8.in
index 9aec9f4..fc9b6a6 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -593,6 +593,8 @@ to change the RAID level in some cases. See LEVEL CHANGES below.
This option configures the fine details of data layout for RAID5, RAID6,
and RAID10 arrays, and controls the failure modes for
.IR faulty .
+It can also be used for working around a kernel bug with RAID0, but generally
+doesn't need to be used explicitly.
The layout of the RAID5 parity block can be one of
.BR left\-asymmetric ,
@@ -652,7 +654,7 @@ option to set subsequent failure modes.
"clear" or "none" will remove any pending or periodic failure modes,
and "flush" will clear any persistent faults.
-Finally, the layout options for RAID10 are one of 'n', 'o' or 'f' followed
+The layout options for RAID10 are one of 'n', 'o' or 'f' followed
by a small number. The default is 'n2'. The supported options are:
.I 'n'
@@ -677,6 +679,32 @@ devices in the array. It does not need to divide evenly into that
number (e.g. it is perfectly legal to have an 'n2' layout for an array
with an odd number of devices).
+A bug introduced in Linux 3.14 means that RAID0 arrays
+.B "with devices of differing sizes"
+started using a different layout. This could lead to
+data corruption. Since Linux 5.4 (and various stable releases that received
+backports), the kernel will not accept such an array unless
+a layout is explictly set. It can be set to
+.RB ' original '
+or
+.RB ' alternate '.
+When creating a new array,
+.I mdadm
+will select
+.RB ' original '
+by default, so the layout does not normally need to be set.
+An array created for either
+.RB ' original '
+or
+.RB ' alternate '
+will not be recognized by an (unpatched) kernel prior to 5.4. To create
+a RAID0 array with devices of differing sizes that can be used on an
+older kernel, you can set the layout to
+.RB ' dangerous '.
+This will use whichever layout the running kernel supports, so the data
+on the array may become corrupt when changing kernel from pre-3.14 to a
+later kernel.
+
When an array is converted between RAID5 and RAID6 an intermediate
RAID6 layout is used in which the second parity block (Q) is always on
the last device. To convert a RAID5 to RAID6 and leave it in this new
diff --git a/mdadm.c b/mdadm.c
index 1fb8086..e438f9c 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -550,6 +550,14 @@ int main(int argc, char *argv[])
pr_err("raid level must be given before layout.\n");
exit(2);
+ case 0:
+ s.layout = map_name(r0layout, optarg);
+ if (s.layout == UnSet) {
+ pr_err("layout %s not understood for raid0.\n",
+ optarg);
+ exit(2);
+ }
+ break;
case 5:
s.layout = map_name(r5layout, optarg);
if (s.layout == UnSet) {
diff --git a/mdadm.h b/mdadm.h
index 91f1338..9e98778 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -763,7 +763,8 @@ extern int restore_stripes(int *dest, unsigned long long *offsets,
extern char *map_num(mapping_t *map, int num);
extern int map_name(mapping_t *map, char *name);
-extern mapping_t r5layout[], r6layout[], pers[], modes[], faultylayout[];
+extern mapping_t r0layout[], r5layout[], r6layout[],
+ pers[], modes[], faultylayout[];
extern mapping_t consistency_policies[], sysfs_array_states[];
extern char *map_dev_preferred(int major, int minor, int create,
@@ -1758,6 +1759,11 @@ char *xstrdup(const char *str);
#define makedev(M,m) (((M)<<8) | (m))
#endif
+enum r0layout {
+ RAID0_ORIG_LAYOUT = 1,
+ RAID0_ALT_MULTIZONE_LAYOUT = 2,
+};
+
/* for raid4/5/6 */
#define ALGORITHM_LEFT_ASYMMETRIC 0
#define ALGORITHM_RIGHT_ASYMMETRIC 1
diff --git a/super0.c b/super0.c
index 6b7c0e3..6af140b 100644
--- a/super0.c
+++ b/super0.c
@@ -1291,6 +1291,12 @@ static int validate_geometry0(struct supertype *st, int level,
if (*chunk == UnSet)
*chunk = DEFAULT_CHUNK;
+ if (level == 0 && layout != UnSet) {
+ if (verbose)
+ pr_err("0.90 metadata does not support layouts for RAID0\n");
+ return 0;
+ }
+
if (!subdev)
return 1;
diff --git a/super1.c b/super1.c
index 929466d..cedbb53 100644
--- a/super1.c
+++ b/super1.c
@@ -43,7 +43,7 @@ struct mdp_superblock_1 {
__u64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/
__u32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */
- __u32 layout; /* only for raid5 currently */
+ __u32 layout; /* used for raid5, raid6, raid10, and raid0 */
__u64 size; /* used size of component devices, in 512byte sectors */
__u32 chunksize; /* in 512byte sectors */
@@ -144,6 +144,7 @@ struct misc_dev_info {
#define MD_FEATURE_JOURNAL 512 /* support write journal */
#define MD_FEATURE_PPL 1024 /* support PPL */
#define MD_FEATURE_MUTLIPLE_PPLS 2048 /* support for multiple PPLs */
+#define MD_FEATURE_RAID0_LAYOUT 4096 /* layout is meaningful in RAID0 */
#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
|MD_FEATURE_RECOVERY_OFFSET \
|MD_FEATURE_RESHAPE_ACTIVE \
@@ -155,6 +156,7 @@ struct misc_dev_info {
|MD_FEATURE_JOURNAL \
|MD_FEATURE_PPL \
|MD_FEATURE_MULTIPLE_PPLS \
+ |MD_FEATURE_RAID0_LAYOUT \
)
static int role_from_sb(struct mdp_superblock_1 *sb)
@@ -498,6 +500,11 @@ static void examine_super1(struct supertype *st, char *homehost)
printf(" Events : %llu\n",
(unsigned long long)__le64_to_cpu(sb->events));
printf("\n");
+ if (__le32_to_cpu(sb->level) == 0 &&
+ (sb->feature_map & __cpu_to_le32(MD_FEATURE_RAID0_LAYOUT))) {
+ c = map_num(r0layout, __le32_to_cpu(sb->layout));
+ printf(" Layout : %s\n", c?c:"-unknown-");
+ }
if (__le32_to_cpu(sb->level) == 5) {
c = map_num(r5layout, __le32_to_cpu(sb->layout));
printf(" Layout : %s\n", c?c:"-unknown-");
@@ -1646,6 +1653,7 @@ struct devinfo {
int fd;
char *devname;
long long data_offset;
+ unsigned long long dev_size;
mdu_disk_info_t disk;
struct devinfo *next;
};
@@ -1687,6 +1695,7 @@ static int add_to_super1(struct supertype *st, mdu_disk_info_t *dk,
di->devname = devname;
di->disk = *dk;
di->data_offset = data_offset;
+ get_dev_size(fd, NULL, &di->dev_size);
di->next = NULL;
*dip = di;
@@ -1888,10 +1897,25 @@ static int write_init_super1(struct supertype *st)
unsigned long long sb_offset;
unsigned long long data_offset;
long bm_offset;
+ int raid0_need_layout = 0;
for (di = st->info; di; di = di->next) {
if (di->disk.state & (1 << MD_DISK_JOURNAL))
sb->feature_map |= __cpu_to_le32(MD_FEATURE_JOURNAL);
+ if (sb->level == 0 && sb->layout != 0) {
+ struct devinfo *di2 = st->info;
+ unsigned long long s1, s2;
+ s1 = di->dev_size;
+ if (di->data_offset != INVALID_SECTORS)
+ s1 -= di->data_offset;
+ s1 /= __le32_to_cpu(sb->chunksize);
+ s2 = di2->dev_size;
+ if (di2->data_offset != INVALID_SECTORS)
+ s2 -= di2->data_offset;
+ s2 /= __le32_to_cpu(sb->chunksize);
+ if (s1 != s2)
+ raid0_need_layout = 1;
+ }
}
for (di = st->info; di; di = di->next) {
@@ -2039,6 +2063,10 @@ static int write_init_super1(struct supertype *st)
sb->bblog_offset = 0;
}
+ /* RAID0 needs a layout if devices aren't all the same size */
+ if (raid0_need_layout)
+ sb->feature_map |= __cpu_to_le32(MD_FEATURE_RAID0_LAYOUT);
+
sb->sb_csum = calc_sb_1_csum(sb);
rv = store_super1(st, di->fd);
--
2.16.4
++++++ 0060-Assemble-add-support-for-RAID0-layouts.patch ++++++
>From 027c099fd1a31fb3815e592de75d0791a22353b4 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb(a)suse.de>
Date: Mon, 4 Nov 2019 14:27:49 +1100
Subject: [PATCH] Assemble: add support for RAID0 layouts.
Git-commit: 027c099fd1a31fb3815e592de75d0791a22353b4
Patch-mainline: mdadm-4.1+
References: bsc#1162479
If you have a RAID0 array with varying sized devices
on a kernel before 5.4, you cannot assembling it on
5.4 or later without explicitly setting the layout.
This is now possible with
--update=layout-original (For 3.13 and earlier kernels)
or
--update=layout-alternate (for 3.14 and later kernels)
Signed-off-by: NeilBrown <neilb(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
Assemble.c | 8 ++++++++
md.4 | 7 +++++++
mdadm.8.in | 17 +++++++++++++++++
mdadm.c | 4 ++++
super1.c | 12 +++++++++++-
5 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/Assemble.c b/Assemble.c
index b2e6914..6b5a7c8 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1031,6 +1031,11 @@ static int start_array(int mdfd,
pr_err("failed to add %s to %s: %s\n",
devices[j].devname, mddev,
strerror(errno));
+ if (errno == EINVAL && content->array.level == 0 &&
+ content->array.layout != 0) {
+ cont_err("Possibly your kernel doesn't support RAID0 layouts.\n");
+ cont_err("Please upgrade.\n");
+ }
if (i < content->array.raid_disks * 2 ||
i == bestcnt)
okcnt--;
@@ -1220,6 +1225,9 @@ static int start_array(int mdfd,
return 0;
}
pr_err("failed to RUN_ARRAY %s: %s\n", mddev, strerror(errno));
+ if (errno == 524 /* ENOTSUP */ &&
+ content->array.level == 0 && content->array.layout == 0)
+ cont_err("Please use --update=layout-original or --update=layout-alternate\n");
if (!enough(content->array.level, content->array.raid_disks,
content->array.layout, 1, avail))
diff --git a/md.4 b/md.4
index 6fe2755..0712af2 100644
--- a/md.4
+++ b/md.4
@@ -208,6 +208,13 @@ array,
will record the chosen layout in the metadata in a way that allows newer
kernels to assemble the array without needing a module parameter.
+To assemble an old array on a new kernel without using the module parameter,
+use either the
+.B "--update=layout-original"
+option or the
+.B "--update=layout-alternate"
+option.
+
.SS RAID1
A RAID1 array is also known as a mirrored set (though mirrors tend to
diff --git a/mdadm.8.in b/mdadm.8.in
index fc9b6a6..6b63bb4 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -1213,6 +1213,8 @@ argument given to this flag can be one of
.BR no\-bbl ,
.BR ppl ,
.BR no\-ppl ,
+.BR layout\-original ,
+.BR layout\-alternate ,
.BR metadata ,
or
.BR super\-minor .
@@ -1364,6 +1366,21 @@ The
.B no\-ppl
option will disable PPL in the superblock.
+The
+.B layout\-original
+and
+.B layout\-alternate
+options are for RAID0 arrays in use before Linux 5.4. If the array was being
+used with Linux 3.13 or earlier, then to assemble the array on a new kernel,
+.B \-\-update=layout\-original
+must be given. If the array was created and used with a kernel from Linux 3.14 to
+Linux 5.3, then
+.B \-\-update=layout\-alternate
+must be given. This only needs to be given once. Subsequent assembly of the array
+will happen normally.
+For more information, see
+.IR md (4).
+
.TP
.BR \-\-freeze\-reshape
Option is intended to be used in start-up scripts during initrd boot phase.
diff --git a/mdadm.c b/mdadm.c
index e438f9c..256a97e 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -795,6 +795,9 @@ int main(int argc, char *argv[])
continue;
if (strcmp(c.update, "revert-reshape") == 0)
continue;
+ if (strcmp(c.update, "layout-original") == 0 ||
+ strcmp(c.update, "layout-alternate") == 0)
+ continue;
if (strcmp(c.update, "byteorder") == 0) {
if (ss) {
pr_err("must not set metadata type with --update=byteorder.\n");
@@ -825,6 +828,7 @@ int main(int argc, char *argv[])
" 'summaries', 'homehost', 'home-cluster', 'byteorder', 'devicesize',\n"
" 'no-bitmap', 'metadata', 'revert-reshape'\n"
" 'bbl', 'no-bbl', 'force-no-bbl', 'ppl', 'no-ppl'\n"
+ " 'layout-original', 'layout-alternate'\n"
);
exit(outf == stdout ? 0 : 2);
diff --git a/super1.c b/super1.c
index cedbb53..e0d80be 100644
--- a/super1.c
+++ b/super1.c
@@ -1550,7 +1550,17 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
sb->devflags |= FailFast1;
else if (strcmp(update, "nofailfast") == 0)
sb->devflags &= ~FailFast1;
- else
+ else if (strcmp(update, "layout-original") == 0 ||
+ strcmp(update, "layout-alternate") == 0) {
+ if (__le32_to_cpu(sb->level) != 0) {
+ pr_err("%s: %s only supported for RAID0\n",
+ devname?:"", update);
+ rv = -1;
+ } else {
+ sb->feature_map |= __cpu_to_le32(MD_FEATURE_RAID0_LAYOUT);
+ sb->layout = __cpu_to_le32(update[7] == 'o' ? 1 : 2);
+ }
+ } else
rv = -1;
sb->sb_csum = calc_sb_1_csum(sb);
--
2.16.4
++++++ 0061-Respect-CROSS_COMPILE-when-CC-is-the-default.patch ++++++
>From aced6fc9542077a69b00d05bc9cd66c12fc34950 Mon Sep 17 00:00:00 2001
From: dann frazier <dann.frazier(a)canonical.com>
Date: Mon, 9 Dec 2019 13:54:13 -0700
Subject: [PATCH] Respect $(CROSS_COMPILE) when $(CC) is the default
Git-commit: aced6fc9542077a69b00d05bc9cd66c12fc34950
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Commit 1180ed5 told make to only respect $(CROSS_COMPILE) when $(CC)
was unset. But that will never be the case, as make provides
a default value for $(CC). Change this logic to respect $(CROSS_COMPILE)
when $(CC) is the default. Patch originally by Helmet Grohne.
Fixes: 1180ed5 ("Makefile: make the CC definition conditional")
Signed-off-by: dann frazier <dann.frazier(a)canonical.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index dfe00b0..a33319a 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,9 @@ ifdef COVERITY
COVERITY_FLAGS=-include coverity-gcc-hack.h
endif
-CC ?= $(CROSS_COMPILE)gcc
+ifeq ($(origin CC),default)
+CC := $(CROSS_COMPILE)gcc
+endif
CXFLAGS ?= -ggdb
CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
ifdef WARN_UNUSED
--
2.25.0
++++++ 0062-Change-warning-message.patch ++++++
>From 1a87493014050e3bd94000cd36122c3cadf21270 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska(a)intel.com>
Date: Tue, 10 Dec 2019 12:21:21 +0100
Subject: [PATCH] Change warning message
Git-commit: 1a87493014050e3bd94000cd36122c3cadf21270
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
In commit 039b7225e6 ("md: allow creation of mdNNN arrays via
md_mod/parameters/new_array") support for name like mdNNN
was added. Special warning, when kernel is unable to handle
request, was added in commit 7105228e19
("mdadm/mdopen: create new function create_named_array for
writing to new_array"), but it was not adequate enough,
because in this situation mdadm tries to do it in old way.
This commit changes warning to be more relevant when
creating RAID container with "/dev/mdNNN" name and mdadm
back to old approach.
Signed-off-by: Kinga Tanska <kinga.tanska(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdopen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mdopen.c b/mdopen.c
index 98c54e4..245be53 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -120,7 +120,8 @@ int create_named_array(char *devnm)
close(fd);
}
if (fd < 0 || n != (int)strlen(devnm)) {
- pr_err("Fail create %s when using %s\n", devnm, new_array_file);
+ pr_err("Fail to create %s when using %s, fallback to creation via node\n",
+ devnm, new_array_file);
return 0;
}
--
2.25.0
++++++ 0063-mdcheck-service-can-t-start-succesfully-because-of-s.patch ++++++
>From e1512e7b7d060f0346738b237ea34eac21b29a26 Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni(a)redhat.com>
Date: Wed, 18 Dec 2019 14:46:21 +0800
Subject: [PATCH] mdcheck service can't start succesfully because of syntax
error
Git-commit: e1512e7b7d060f0346738b237ea34eac21b29a26
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
It reports error when starting mdcheck_start and mdcheck_continue service.
Invalid environment assignment, ignoring: MDADM_CHECK_DURATION="6 hours"
Signed-off-by: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
systemd/mdcheck_continue.service | 2 +-
systemd/mdcheck_start.service | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
index deac695..aa02dde 100644
--- a/systemd/mdcheck_continue.service
+++ b/systemd/mdcheck_continue.service
@@ -11,7 +11,7 @@ ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_*
[Service]
Type=oneshot
-Environment= MDADM_CHECK_DURATION="6 hours"
+Environment= "MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
index f17f1aa..da62d5f 100644
--- a/systemd/mdcheck_start.service
+++ b/systemd/mdcheck_start.service
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer
[Service]
Type=oneshot
-Environment= MDADM_CHECK_DURATION="6 hours"
+Environment= "MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
--
2.25.0
++++++ 0064-imsm-Update-grow-manual.patch ++++++
>From 4431efebabd0dd39f33dc1dd8ada312b8da1c9d8 Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Thu, 16 Jan 2020 09:34:44 +0100
Subject: [PATCH] imsm: Update grow manual.
Git-commit: 4431efebabd0dd39f33dc1dd8ada312b8da1c9d8
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Update --grow option description in manual, according to
the supported grow operations by IMSM.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdadm.8.in | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/mdadm.8.in b/mdadm.8.in
index 6b63bb4..ca02a33 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -481,9 +481,7 @@ still be larger than any replacement.
This value can be set with
.B \-\-grow
for RAID level 1/4/5/6 though
-.B CONTAINER
-based arrays such as those with IMSM metadata may not be able to
-support this.
+DDF arrays may not be able to support this.
If the array was created with a size smaller than the currently
active drives, the extra space can be accessed using
.BR \-\-grow .
@@ -2759,9 +2757,7 @@ container format. The number of devices in a container can be
increased - which affects all arrays in the container - or an array
in a container can be converted between levels where those levels are
supported by the container, and the conversion is on of those listed
-above. Resizing arrays in an IMSM container with
-.B "--grow --size"
-is not yet supported.
+above.
.PP
Notes:
--
2.25.0
++++++ 0065-Add-support-for-Tebibytes.patch ++++++
>From 42e641abeb312a91b841f1b1ea73661e4bd5a31c Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska(a)intel.com>
Date: Tue, 21 Jan 2020 10:38:52 +0100
Subject: [PATCH] Add support for Tebibytes
Git-commit: 42e641abeb312a91b841f1b1ea73661e4bd5a31c
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Adding support for Tebibytes enables display size of
volumes in Tebibytes and Terabytes when they are
bigger than 2048 GiB (or GB).
Signed-off-by: Kinga Tanska <kinga.tanska(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdadm.8.in | 20 ++++++++++----------
util.c | 47 +++++++++++++++++++++++++++++++++--------------
2 files changed, 43 insertions(+), 24 deletions(-)
diff --git a/mdadm.8.in b/mdadm.8.in
index ca02a33..5d00faf 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -467,8 +467,8 @@ If this is not specified
size, though if there is a variance among the drives of greater than 1%, a warning is
issued.
-A suffix of 'K', 'M' or 'G' can be given to indicate Kilobytes, Megabytes or
-Gigabytes respectively.
+A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
+Megabytes, Gigabytes or Terabytes respectively.
Sometimes a replacement drive can be a little smaller than the
original drives though this should be minimised by IDEMA standards.
@@ -532,8 +532,8 @@ problems the array can be made bigger again with no loss with another
.B "\-\-grow \-\-array\-size="
command.
-A suffix of 'K', 'M' or 'G' can be given to indicate Kilobytes, Megabytes or
-Gigabytes respectively.
+A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
+Megabytes, Gigabytes or Terabytes respectively.
A value of
.B max
restores the apparent size of the array to be whatever the real
@@ -551,8 +551,8 @@ This is only meaningful for RAID0, RAID4, RAID5, RAID6, and RAID10.
RAID4, RAID5, RAID6, and RAID10 require the chunk size to be a power
of 2. In any case it must be a multiple of 4KB.
-A suffix of 'K', 'M' or 'G' can be given to indicate Kilobytes, Megabytes or
-Gigabytes respectively.
+A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
+Megabytes, Gigabytes or Terabytes respectively.
.TP
.BR \-\-rounding=
@@ -767,8 +767,8 @@ When using an
bitmap, the chunksize defaults to 64Meg, or larger if necessary to
fit the bitmap into the available space.
-A suffix of 'K', 'M' or 'G' can be given to indicate Kilobytes, Megabytes or
-Gigabytes respectively.
+A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
+Megabytes, Gigabytes or Terabytes respectively.
.TP
.BR \-W ", " \-\-write\-mostly
@@ -857,8 +857,8 @@ an array which was originally created using a different version of
which computed a different offset.
Setting the offset explicitly over-rides the default. The value given
-is in Kilobytes unless a suffix of 'K', 'M' or 'G' is used to explicitly
-indicate Kilobytes, Megabytes or Gigabytes respectively.
+is in Kilobytes unless a suffix of 'K', 'M', 'G' or 'T' is used to explicitly
+indicate Kilobytes, Megabytes, Gigabytes or Terabytes respectively.
Since Linux 3.4,
.B \-\-data\-offset
diff --git a/util.c b/util.c
index 64dd409..07f9dc3 100644
--- a/util.c
+++ b/util.c
@@ -389,7 +389,7 @@ int mdadm_version(char *version)
unsigned long long parse_size(char *size)
{
/* parse 'size' which should be a number optionally
- * followed by 'K', 'M', or 'G'.
+ * followed by 'K', 'M'. 'G' or 'T'.
* Without a suffix, K is assumed.
* Number returned is in sectors (half-K)
* INVALID_SECTORS returned on error.
@@ -411,6 +411,10 @@ unsigned long long parse_size(char *size)
c++;
s *= 1024 * 1024 * 2;
break;
+ case 'T':
+ c++;
+ s *= 1024 * 1024 * 1024 * 2LL;
+ break;
case 's': /* sectors */
c++;
break;
@@ -893,13 +897,14 @@ char *human_size(long long bytes)
{
static char buf[47];
- /* We convert bytes to either centi-M{ega,ibi}bytes or
- * centi-G{igi,ibi}bytes, with appropriate rounding,
- * and then print 1/100th of those as a decimal.
+ /* We convert bytes to either centi-M{ega,ibi}bytes,
+ * centi-G{igi,ibi}bytes or centi-T{era,ebi}bytes
+ * with appropriate rounding, and then print
+ * 1/100th of those as a decimal.
* We allow upto 2048Megabytes before converting to
- * gigabytes, as that shows more precision and isn't
+ * gigabytes and 2048Gigabytes before converting to
+ * terabytes, as that shows more precision and isn't
* too large a number.
- * Terabytes are not yet handled.
*/
if (bytes < 5000*1024)
@@ -909,11 +914,16 @@ char *human_size(long long bytes)
long cMB = (bytes / ( 1000000LL / 200LL ) +1) /2;
snprintf(buf, sizeof(buf), " (%ld.%02ld MiB %ld.%02ld MB)",
cMiB/100, cMiB % 100, cMB/100, cMB % 100);
- } else {
+ } else if (bytes < 2*1024LL*1024LL*1024LL*1024LL) {
long cGiB = (bytes * 200LL / (1LL<<30) +1) / 2;
long cGB = (bytes / (1000000000LL/200LL ) +1) /2;
snprintf(buf, sizeof(buf), " (%ld.%02ld GiB %ld.%02ld GB)",
cGiB/100, cGiB % 100, cGB/100, cGB % 100);
+ } else {
+ long cTiB = (bytes * 200LL / (1LL<<40) + 1) / 2;
+ long cTB = (bytes / (1000000000000LL / 200LL) + 1) / 2;
+ snprintf(buf, sizeof(buf), " (%ld.%02ld TiB %ld.%02ld TB)",
+ cTiB/100, cTiB % 100, cTB/100, cTB % 100);
}
return buf;
}
@@ -922,13 +932,14 @@ char *human_size_brief(long long bytes, int prefix)
{
static char buf[30];
- /* We convert bytes to either centi-M{ega,ibi}bytes or
- * centi-G{igi,ibi}bytes, with appropriate rounding,
- * and then print 1/100th of those as a decimal.
+ /* We convert bytes to either centi-M{ega,ibi}bytes,
+ * centi-G{igi,ibi}bytes or centi-T{era,ebi}bytes
+ * with appropriate rounding, and then print
+ * 1/100th of those as a decimal.
* We allow upto 2048Megabytes before converting to
- * gigabytes, as that shows more precision and isn't
+ * gigabytes and 2048Gigabytes before converting to
+ * terabytes, as that shows more precision and isn't
* too large a number.
- * Terabytes are not yet handled.
*
* If prefix == IEC, we mean prefixes like kibi,mebi,gibi etc.
* If prefix == JEDEC, we mean prefixes like kilo,mega,giga etc.
@@ -941,10 +952,14 @@ char *human_size_brief(long long bytes, int prefix)
long cMiB = (bytes * 200LL / (1LL<<20) +1) /2;
snprintf(buf, sizeof(buf), "%ld.%02ldMiB",
cMiB/100, cMiB % 100);
- } else {
+ } else if (bytes < 2*1024LL*1024LL*1024LL*1024LL) {
long cGiB = (bytes * 200LL / (1LL<<30) +1) /2;
snprintf(buf, sizeof(buf), "%ld.%02ldGiB",
cGiB/100, cGiB % 100);
+ } else {
+ long cTiB = (bytes * 200LL / (1LL<<40) + 1) / 2;
+ snprintf(buf, sizeof(buf), "%ld.%02ldTiB",
+ cTiB/100, cTiB % 100);
}
}
else if (prefix == JEDEC) {
@@ -952,10 +967,14 @@ char *human_size_brief(long long bytes, int prefix)
long cMB = (bytes / ( 1000000LL / 200LL ) +1) /2;
snprintf(buf, sizeof(buf), "%ld.%02ldMB",
cMB/100, cMB % 100);
- } else {
+ } else if (bytes < 2*1024LL*1024LL*1024LL*1024LL) {
long cGB = (bytes / (1000000000LL/200LL ) +1) /2;
snprintf(buf, sizeof(buf), "%ld.%02ldGB",
cGB/100, cGB % 100);
+ } else {
+ long cTB = (bytes / (1000000000000LL / 200LL) + 1) / 2;
+ snprintf(buf, sizeof(buf), "%ld.%02ldTB",
+ cTB/100, cTB % 100);
}
}
else
--
2.25.0
++++++ 0066-imsm-fill-working_disks-according-to-metadata.patch ++++++
>From 1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Fri, 17 Jan 2020 15:24:04 +0100
Subject: [PATCH] imsm: fill working_disks according to metadata.
Git-commit: 1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Imsm tracks as "working_disk" each visible drive.
Assemble routine expects that the value will return count
of active member drives recorded in metadata.
As a side effect "--no-degraded" doesn't work correctly for imsm.
Align this field to others.
Added check, if the option --no-degraded is called with --scan.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
mdadm.c | 9 ++++++---
super-intel.c | 5 ++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/mdadm.c b/mdadm.c
index 256a97e..13dc24e 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1485,9 +1485,12 @@ int main(int argc, char *argv[])
rv = Manage_stop(devlist->devname, mdfd, c.verbose, 0);
break;
case ASSEMBLE:
- if (devs_found == 1 && ident.uuid_set == 0 &&
- ident.super_minor == UnSet && ident.name[0] == 0 &&
- !c.scan ) {
+ if (!c.scan && c.runstop == -1) {
+ pr_err("--no-degraded not meaningful without a --scan assembly.\n");
+ exit(1);
+ } else if (devs_found == 1 && ident.uuid_set == 0 &&
+ ident.super_minor == UnSet && ident.name[0] == 0 &&
+ !c.scan) {
/* Only a device has been given, so get details from config file */
struct mddev_ident *array_ident = conf_get_ident(devlist->devname);
if (array_ident == NULL) {
diff --git a/super-intel.c b/super-intel.c
index 5c1f759..47809bc 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7946,7 +7946,8 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
skip = 1;
if (!skip && (ord & IMSM_ORD_REBUILD))
recovery_start = 0;
-
+ if (!(ord & IMSM_ORD_REBUILD))
+ this->array.working_disks++;
/*
* if we skip some disks the array will be assmebled degraded;
* reset resync start to avoid a dirty-degraded
@@ -7988,8 +7989,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
else
this->array.spare_disks++;
}
- if (info_d->recovery_start == MaxSector)
- this->array.working_disks++;
info_d->events = __le32_to_cpu(mpb->generation_num);
info_d->data_offset = pba_of_lba0(map);
--
2.25.0
++++++ 0067-mdadm.8-add-note-information-for-raid0-growing-opera.patch ++++++
>From 2551061c253b8fd45ee93d1aab3e91d2c7ac9c20 Mon Sep 17 00:00:00 2001
From: Coly Li <colyli(a)suse.de>
Date: Mon, 24 Feb 2020 12:34:09 +0100
Subject: [PATCH] mdadm.8: add note information for raid0 growing operation
Git-commit: 2551061c253b8fd45ee93d1aab3e91d2c7ac9c20
Patch-mainline: mdadm-4.1+
References: bsc#1129900
When growing a raid0 device, if the new component disk size is not
big enough, the grow operation may fail due to lack of backup space.
The minimum backup space should be larger than:
LCM(old, new) * chunk-size * 2
where LCM() is the least common multiple of the old and new count of
component disks, and "* 2" comes from the fact that mdadm refuses to
use more than half of a spare device for backup space.
There are users reporting such failure when they grew a raid0 array
with small component disk. Neil Brown points out this is not a bug
and how the failure comes. This patch adds note information into
mdadm(8) man page in the Notes part of GROW MODE section to explain
the minimum size requirement of new component disk size or external
backup size.
Reviewed-by: Petr Vorel <pvorel(a)suse.cz>
Cc: NeilBrown <neilb(a)suse.de>
Cc: Jes Sorensen <jsorensen(a)fb.com>
Cc: Paul Menzel <pmenzel(a)molgen.mpg.de>
Cc: Wols Lists <antlists(a)youngman.org.uk>
Cc: Nix <nix(a)esperi.org.uk>
Signed-off-by: Coly Li <colyli(a)suse.de>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
---
mdadm.8.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mdadm.8.in b/mdadm.8.in
index 5d00faf..a3494a1 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -2768,6 +2768,12 @@ option and it is transparent for assembly feature.
.IP \(bu 4
Roaming between Windows(R) and Linux systems for IMSM metadata is not
supported during grow process.
+.IP \(bu 4
+When growing a raid0 device, the new component disk size (or external
+backup size) should be larger than LCM(old, new) * chunk-size * 2,
+where LCM() is the least common multiple of the old and new count of
+component disks, and "* 2" comes from the fact that mdadm refuses to
+use more than half of a spare device for backup space.
.SS SIZE CHANGES
Normally when an array is built the "size" is taken from the smallest
--
2.25.0
++++++ 0068-Remove-the-legacy-whitespace.patch ++++++
>From fd38b8ea80ff8e0317e12d1d70431148ceedd5fd Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni(a)redhat.com>
Date: Tue, 11 Feb 2020 21:44:15 +0800
Subject: [PATCH] Remove the legacy whitespace
Git-commit: fd38b8ea80ff8e0317e12d1d70431148ceedd5fd
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
The whitespace between Environment= and the true value causes confusion.
To avoid confusing other people in future, remove the whitespace to keep
it a simple, unambiguous syntax
Signed-off-by: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
systemd/mdcheck_continue.service | 2 +-
systemd/mdcheck_start.service | 2 +-
systemd/mdmonitor-oneshot.service | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
index aa02dde..854317f 100644
--- a/systemd/mdcheck_continue.service
+++ b/systemd/mdcheck_continue.service
@@ -11,7 +11,7 @@ ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_*
[Service]
Type=oneshot
-Environment= "MDADM_CHECK_DURATION=6 hours"
+Environment="MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
index da62d5f..3bb3d13 100644
--- a/systemd/mdcheck_start.service
+++ b/systemd/mdcheck_start.service
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer
[Service]
Type=oneshot
-Environment= "MDADM_CHECK_DURATION=6 hours"
+Environment="MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
diff --git a/systemd/mdmonitor-oneshot.service b/systemd/mdmonitor-oneshot.service
index fd469b1..373955a 100644
--- a/systemd/mdmonitor-oneshot.service
+++ b/systemd/mdmonitor-oneshot.service
@@ -9,7 +9,7 @@
Description=Reminder for degraded MD arrays
[Service]
-Environment= MDADM_MONITOR_ARGS=--scan
+Environment=MDADM_MONITOR_ARGS=--scan
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS
--
2.25.0
++++++ 0069-imsm-pass-subarray-id-to-kill_subarray-function.patch ++++++
>From 3364781b929f571a3dc3a6afed09eb1b03ce607c Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Wed, 19 Feb 2020 10:54:49 +0100
Subject: [PATCH] imsm: pass subarray id to kill_subarray function
Git-commit: 3364781b929f571a3dc3a6afed09eb1b03ce607c
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
After patch b6180160f ("imsm: save current_vol number")
current_vol for imsm is not set and kill_subarray()
cannot determine which volume has to be deleted.
Volume has to be passed as "subarray_id".
The parameter affects only IMSM metadata.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
Kill.c | 2 +-
mdadm.h | 3 ++-
super-ddf.c | 2 +-
super-intel.c | 9 ++++-----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Kill.c b/Kill.c
index d4767e2..bfd0efd 100644
--- a/Kill.c
+++ b/Kill.c
@@ -119,7 +119,7 @@ int Kill_subarray(char *dev, char *subarray, int verbose)
st->update_tail = &st->updates;
/* ok we've found our victim, drop the axe */
- rv = st->ss->kill_subarray(st);
+ rv = st->ss->kill_subarray(st, subarray);
if (rv) {
if (verbose >= 0)
pr_err("Failed to delete subarray-%s from %s\n",
diff --git a/mdadm.h b/mdadm.h
index 9e98778..d94569f 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1038,7 +1038,8 @@ extern struct superswitch {
/* query the supertype for default geometry */
void (*default_geometry)(struct supertype *st, int *level, int *layout, int *chunk); /* optional */
/* Permit subarray's to be deleted from inactive containers */
- int (*kill_subarray)(struct supertype *st); /* optional */
+ int (*kill_subarray)(struct supertype *st,
+ char *subarray_id); /* optional */
/* Permit subarray's to be modified */
int (*update_subarray)(struct supertype *st, char *subarray,
char *update, struct mddev_ident *ident); /* optional */
diff --git a/super-ddf.c b/super-ddf.c
index 7802063..7cd5702 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -4446,7 +4446,7 @@ static int _kill_subarray_ddf(struct ddf_super *ddf, const char *guid)
return 0;
}
-static int kill_subarray_ddf(struct supertype *st)
+static int kill_subarray_ddf(struct supertype *st, char *subarray_id)
{
struct ddf_super *ddf = st->sb;
/*
diff --git a/super-intel.c b/super-intel.c
index 47809bc..e4d2122 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7600,18 +7600,17 @@ static void default_geometry_imsm(struct supertype *st, int *level, int *layout,
static void handle_missing(struct intel_super *super, struct imsm_dev *dev);
-static int kill_subarray_imsm(struct supertype *st)
+static int kill_subarray_imsm(struct supertype *st, char *subarray_id)
{
- /* remove the subarray currently referenced by ->current_vol */
+ /* remove the subarray currently referenced by subarray_id */
__u8 i;
struct intel_dev **dp;
struct intel_super *super = st->sb;
- __u8 current_vol = super->current_vol;
+ __u8 current_vol = strtoul(subarray_id, NULL, 10);
struct imsm_super *mpb = super->anchor;
- if (super->current_vol < 0)
+ if (mpb->num_raid_devs == 0)
return 2;
- super->current_vol = -1; /* invalidate subarray cursor */
/* block deletions that would change the uuid of active subarrays
*
--
2.25.0
++++++ 0070-imsm-Remove-dump-restore-implementation.patch ++++++
>From 45c43276d02a32876c7e1f9f0d04580595141b3d Mon Sep 17 00:00:00 2001
From: Blazej Kucman <blazej.kucman(a)intel.com>
Date: Wed, 19 Feb 2020 11:13:17 +0100
Subject: [PATCH] imsm: Remove --dump/--restore implementation
Git-commit: 45c43276d02a32876c7e1f9f0d04580595141b3d
Patch-mainline: mdadm-4.1+
References: jsc#SLE-10078, jsc#SLE-9348
Functionalities --dump and --restore are not supported.
Remove dead code from imsm.
Signed-off-by: Blazej Kucman <blazej.kucman(a)intel.com>
Signed-off-by: Jes Sorensen <jsorensen(a)fb.com>
Signed-off-by: Coly Li <colyli(a)suse.de>
---
super-intel.c | 56 ---------------------------------------------------
1 file changed, 56 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index e4d2122..c9a1af5 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2128,61 +2128,6 @@ static void export_examine_super_imsm(struct supertype *st)
printf("MD_DEVICES=%u\n", mpb->num_disks);
}
-static int copy_metadata_imsm(struct supertype *st, int from, int to)
-{
- /* The second last sector of the device contains
- * the "struct imsm_super" metadata.
- * This contains mpb_size which is the size in bytes of the
- * extended metadata. This is located immediately before
- * the imsm_super.
- * We want to read all that, plus the last sector which
- * may contain a migration record, and write it all
- * to the target.
- */
- void *buf;
- unsigned long long dsize, offset;
- int sectors;
- struct imsm_super *sb;
- struct intel_super *super = st->sb;
- unsigned int sector_size = super->sector_size;
- unsigned int written = 0;
-
- if (posix_memalign(&buf, MAX_SECTOR_SIZE, MAX_SECTOR_SIZE) != 0)
- return 1;
-
- if (!get_dev_size(from, NULL, &dsize))
- goto err;
-
- if (lseek64(from, dsize-(2*sector_size), 0) < 0)
- goto err;
- if ((unsigned int)read(from, buf, sector_size) != sector_size)
- goto err;
- sb = buf;
- if (strncmp((char*)sb->sig, MPB_SIGNATURE, MPB_SIG_LEN) != 0)
- goto err;
-
- sectors = mpb_sectors(sb, sector_size) + 2;
- offset = dsize - sectors * sector_size;
- if (lseek64(from, offset, 0) < 0 ||
- lseek64(to, offset, 0) < 0)
- goto err;
- while (written < sectors * sector_size) {
- int n = sectors*sector_size - written;
- if (n > 4096)
- n = 4096;
- if (read(from, buf, n) != n)
- goto err;
- if (write(to, buf, n) != n)
- goto err;
- written += n;
- }
- free(buf);
- return 0;
-err:
- free(buf);
- return 1;
-}
-
static void detail_super_imsm(struct supertype *st, char *homehost,
char *subarray)
{
@@ -12270,7 +12215,6 @@ struct superswitch super_imsm = {
.reshape_super = imsm_reshape_super,
.manage_reshape = imsm_manage_reshape,
.recover_backup = recover_backup_imsm,
- .copy_metadata = copy_metadata_imsm,
.examine_badblocks = examine_badblocks_imsm,
.match_home = match_home_imsm,
.uuid_from_super= uuid_from_super_imsm,
--
2.25.0
1
0
Hello community,
here is the log from the commit of package go1.11 for openSUSE:Leap:15.2 checked in at 2020-05-31 13:45:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/go1.11 (Old)
and /work/SRC/openSUSE:Leap:15.2/.go1.11.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "go1.11"
Sun May 31 13:45:22 2020 rev:7 rq:809164 version:1.11.13
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/go1.11/go1.11.changes 2020-05-01 15:06:44.186491300 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.go1.11.new.3606/go1.11.changes 2020-05-31 13:45:22.441609513 +0200
@@ -1,0 +2,5 @@
+Wed Apr 29 13:16:50 UTC 2020 - Guillaume GARDET <guillaume.gardet(a)opensuse.org>
+
+- Requires binutils-gold for %arm and aarch64 - boo#1170826
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ go1.11.spec ++++++
--- /var/tmp/diff_new_pack.Ex8j8v/_old 2020-05-31 13:45:22.953611097 +0200
+++ /var/tmp/diff_new_pack.Ex8j8v/_new 2020-05-31 13:45:22.957611110 +0200
@@ -141,6 +141,11 @@
BuildRequires: rpm >= 4.11.1
Requires(post): update-alternatives
Requires(postun): update-alternatives
+# Needed on arm aarch64 to avoid
+# collect2: fatal error: cannot find 'ld'-
+%ifarch %arm aarch64
+Requires: binutils-gold
+%endif
Requires: gcc
Provides: go = %{version}
Provides: go-devel = go%{version}
1
0
Hello community,
here is the log from the commit of package 00Meta for openSUSE:Leap:15.2:PowerPC checked in at 2020-05-31 07:47:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:PowerPC/00Meta (Old)
and /work/SRC/openSUSE:Leap:15.2:PowerPC/.00Meta.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "00Meta"
Sun May 31 07:47:42 2020 rev:164 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ version_totest ++++++
--- /var/tmp/diff_new_pack.5dGzBC/_old 2020-05-31 07:47:43.584033045 +0200
+++ /var/tmp/diff_new_pack.5dGzBC/_new 2020-05-31 07:47:43.584033045 +0200
@@ -1 +1 @@
-272.1
\ No newline at end of file
+279.1
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package 00Meta for openSUSE:Leap:15.1:Images checked in at 2020-05-31 07:30:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Images/00Meta (Old)
and /work/SRC/openSUSE:Leap:15.1:Images/.00Meta.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "00Meta"
Sun May 31 07:30:43 2020 rev:387 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ version_totest ++++++
--- /var/tmp/diff_new_pack.Lfw39M/_old 2020-05-31 07:30:44.749068729 +0200
+++ /var/tmp/diff_new_pack.Lfw39M/_new 2020-05-31 07:30:44.749068729 +0200
@@ -1 +1 @@
-8.12.32
\ No newline at end of file
+8.12.33
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package dehydrated for openSUSE:Leap:15.1:Update checked in at 2020-05-31 06:13:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/dehydrated (Old)
and /work/SRC/openSUSE:Leap:15.1:Update/.dehydrated.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dehydrated"
Sun May 31 06:13:19 2020 rev:2 rq:809702 version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.HL1eKP/_old 2020-05-31 06:13:20.619287023 +0200
+++ /var/tmp/diff_new_pack.HL1eKP/_new 2020-05-31 06:13:20.619287023 +0200
@@ -1 +1 @@
-<link package='dehydrated.10543' cicount='copy' />
+<link package='dehydrated.12758' cicount='copy' />
1
0
Hello community,
here is the log from the commit of package python-rpm-macros for openSUSE:Leap:15.1:Update checked in at 2020-05-31 06:13:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/python-rpm-macros (Old)
and /work/SRC/openSUSE:Leap:15.1:Update/.python-rpm-macros.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpm-macros"
Sun May 31 06:13:14 2020 rev:2 rq:809667 version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.lQ2ONc/_old 2020-05-31 06:13:15.035269933 +0200
+++ /var/tmp/diff_new_pack.lQ2ONc/_new 2020-05-31 06:13:15.035269933 +0200
@@ -1 +1 @@
-<link package='python-rpm-macros.11946' cicount='copy' />
+<link package='python-rpm-macros.12756' cicount='copy' />
1
0