1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in
-index be80025a4..20ce8e632 100644
+index be2fc6734..7606604ec 100644
--- a/etc/systemd/system/zfs-zed.service.in
+++ b/etc/systemd/system/zfs-zed.service.in
-@@ -4,7 +4,7 @@ Documentation=man:zed(8)
- ConditionPathIsDirectory=/sys/module/zfs
+@@ -5,7 +5,7 @@ ConditionPathIsDirectory=/sys/module/zfs
[Service]
+ EnvironmentFile=-@initconfdir@/zfs
-ExecStart=@sbindir@/zed -F
+ExecStart=/usr/sbin/zed -F
Restart=always
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
-index 598ef501b..e4f3a70c1 100644
+index c5dd45d87..1c792edf0 100644
--- a/etc/systemd/system/zfs-import-scan.service.in
+++ b/etc/systemd/system/zfs-import-scan.service.in
-@@ -13,7 +13,7 @@ ConditionPathIsDirectory=/sys/module/zfs
- [Service]
+@@ -14,7 +14,7 @@ ConditionPathIsDirectory=/sys/module/zfs
Type=oneshot
RemainAfterExit=yes
+ EnvironmentFile=-@initconfdir@/zfs
-ExecStart=@sbindir@/zpool import -aN -o cachefile=none $ZPOOL_IMPORT_OPTS
+ExecStart=@sbindir@/zpool import -aN -d /dev/disk/by-id -o cachefile=none $ZPOOL_IMPORT_OPTS
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/zed/zed.d/zed.rc b/cmd/zed/zed.d/zed.rc
-index 1dfd43454..0180dd827 100644
+index 78dc1afc7..41d5539ea 100644
--- a/cmd/zed/zed.d/zed.rc
+++ b/cmd/zed/zed.d/zed.rc
-@@ -42,7 +42,7 @@ ZED_EMAIL_ADDR="root"
+@@ -41,7 +41,7 @@ ZED_EMAIL_ADDR="root"
##
# Minimum number of seconds between notifications for a similar event.
#
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/zed/zed.d/Makefile.am b/cmd/zed/zed.d/Makefile.am
-index 1905a9207..6dc06252a 100644
+index 812558cf6..f802cf140 100644
--- a/cmd/zed/zed.d/Makefile.am
+++ b/cmd/zed/zed.d/Makefile.am
-@@ -51,7 +51,7 @@ install-data-hook:
- for f in $(zedconfdefaults); do \
- test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
- -L "$(DESTDIR)$(zedconfdir)/$${f}" || \
-- ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
+@@ -48,7 +48,7 @@ zed-install-data-hook:
+ set -x; for f in $(zedconfdefaults); do \
+ [ -f "$(DESTDIR)$(zedconfdir)/$${f}" ] ||\
+ [ -L "$(DESTDIR)$(zedconfdir)/$${f}" ] || \
+- $(LN_S) "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
+ echo "$${f}" >> "$(DESTDIR)$(zedexecdir)/DEFAULT-ENABLED" ; \
done
- chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"
+ SHELLCHECKSCRIPTS += $(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
- etc/systemd/system/50-zfs.preset.in | 1 +
- etc/systemd/system/Makefile.am | 1 +
+ etc/Makefile.am | 1 +
+ etc/systemd/system/50-zfs.preset | 1 +
etc/systemd/system/zfs-import@.service.in | 16 ++++++++++++++++
3 files changed, 18 insertions(+)
create mode 100644 etc/systemd/system/zfs-import@.service.in
-diff --git a/etc/systemd/system/50-zfs.preset.in b/etc/systemd/system/50-zfs.preset.in
+diff --git a/etc/Makefile.am b/etc/Makefile.am
+index 7187762d3..de131dc87 100644
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -54,6 +54,7 @@ dist_systemdpreset_DATA = \
+ systemdunit_DATA = \
+ %D%/systemd/system/zfs-import-cache.service \
+ %D%/systemd/system/zfs-import-scan.service \
++ %D%/systemd/system/zfs-import@.service \
+ %D%/systemd/system/zfs-import.target \
+ %D%/systemd/system/zfs-mount.service \
+ %D%/systemd/system/zfs-scrub-monthly@.timer \
+diff --git a/etc/systemd/system/50-zfs.preset b/etc/systemd/system/50-zfs.preset
index e4056a92c..030611419 100644
---- a/etc/systemd/system/50-zfs.preset.in
-+++ b/etc/systemd/system/50-zfs.preset.in
+--- a/etc/systemd/system/50-zfs.preset
++++ b/etc/systemd/system/50-zfs.preset
@@ -1,6 +1,7 @@
# ZFS is enabled by default
enable zfs-import-cache.service
enable zfs-import.target
enable zfs-mount.service
enable zfs-share.service
-diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
-index 35f833de5..af3ae597c 100644
---- a/etc/systemd/system/Makefile.am
-+++ b/etc/systemd/system/Makefile.am
-@@ -7,6 +7,7 @@ systemdunit_DATA = \
- zfs-zed.service \
- zfs-import-cache.service \
- zfs-import-scan.service \
-+ zfs-import@.service \
- zfs-mount.service \
- zfs-share.service \
- zfs-volume-wait.service \
diff --git a/etc/systemd/system/zfs-import@.service.in b/etc/systemd/system/zfs-import@.service.in
new file mode 100644
index 000000000..9b4ee9371
rename man/{man1/arcstat.1 => man8/arcstat.8} (99%)
diff --git a/man/Makefile.am b/man/Makefile.am
-index 64650c2b9..95a66a62f 100644
+index 36c1aede1..94fd96e58 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
-@@ -8,7 +8,6 @@ dist_man_MANS = \
- man1/ztest.1 \
- man1/raidz_test.1 \
- man1/zvol_wait.1 \
-- man1/arcstat.1 \
- \
- man5/vdev_id.conf.5 \
- \
+@@ -2,7 +2,6 @@ dist_noinst_man_MANS = \
+ %D%/man1/cstyle.1
+
+ dist_man_MANS = \
+- %D%/man1/arcstat.1 \
+ %D%/man1/raidz_test.1 \
+ %D%/man1/test-runner.1 \
+ %D%/man1/zhack.1 \
@@ -22,6 +21,7 @@ dist_man_MANS = \
- man7/zpoolconcepts.7 \
- man7/zpoolprops.7 \
+ %D%/man7/zpoolconcepts.7 \
+ %D%/man7/zpoolprops.7 \
\
-+ man8/arcstat.8 \
- man8/fsck.zfs.8 \
- man8/mount.zfs.8 \
- man8/vdev_id.8 \
++ %D%/man8/arcstat.8 \
+ %D%/man8/fsck.zfs.8 \
+ %D%/man8/mount.zfs.8 \
+ %D%/man8/vdev_id.8 \
diff --git a/man/man1/arcstat.1 b/man/man8/arcstat.8
similarity index 99%
rename from man/man1/arcstat.1
rename to man/man8/arcstat.8
-index a69cd8937..dfe9c971b 100644
+index 82358fa68..a8fb55498 100644
--- a/man/man1/arcstat.1
+++ b/man/man8/arcstat.8
@@ -13,7 +13,7 @@
.\" Copyright (c) 2020 by AJ Jordan. All rights reserved.
.\"
- .Dd May 26, 2021
+ .Dd December 23, 2022
-.Dt ARCSTAT 1
+.Dt ARCSTAT 8
.Os
--- /dev/null
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Date: Wed, 10 Nov 2021 09:29:47 +0100
+Subject: [PATCH] arc stat/summary: guard access to l2arc MFU/MRU stats
+
+commit 085321621e79a75bea41c2b6511da6ebfbf2ba0a added printing MFU
+and MRU stats for 2.1 user space tools, but those keys are not
+available in the 2.0 module. That means it may break the arcstat and
+arc_summary tools after upgrade to 2.1 (user space), before a reboot
+to the new 2.1 ZFS kernel-module happened, due to python raising a
+KeyError on the dict access then.
+
+Move those two keys to a .get accessor with `0` as fallback, as it
+should be better to show some possible wrong data for new stat-keys
+than throwing an exception.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+
+also move l2_mfu_asize l2_mru_asize l2_prefetch_asize
+l2_bufc_data_asize l2_bufc_metadata_asize to .get accessor
+(these are only present with a cache device in the pool)
+Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ cmd/arc_summary | 28 ++++++++++++++--------------
+ cmd/arcstat.in | 14 +++++++-------
+ 2 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/arc_summary b/cmd/arc_summary
+index 426e02070..9de198150 100755
+--- a/cmd/arc_summary
++++ b/cmd/arc_summary
+@@ -655,13 +655,13 @@ def section_arc(kstats_dict):
+ prt_i1('L2 cached evictions:', f_bytes(arc_stats['evict_l2_cached']))
+ prt_i1('L2 eligible evictions:', f_bytes(arc_stats['evict_l2_eligible']))
+ prt_i2('L2 eligible MFU evictions:',
+- f_perc(arc_stats['evict_l2_eligible_mfu'],
++ f_perc(arc_stats.get('evict_l2_eligible_mfu', 0), # 2.0 module compat
+ arc_stats['evict_l2_eligible']),
+- f_bytes(arc_stats['evict_l2_eligible_mfu']))
++ f_bytes(arc_stats.get('evict_l2_eligible_mfu', 0)))
+ prt_i2('L2 eligible MRU evictions:',
+- f_perc(arc_stats['evict_l2_eligible_mru'],
++ f_perc(arc_stats.get('evict_l2_eligible_mru', 0), # 2.0 module compat
+ arc_stats['evict_l2_eligible']),
+- f_bytes(arc_stats['evict_l2_eligible_mru']))
++ f_bytes(arc_stats.get('evict_l2_eligible_mru', 0)))
+ prt_i1('L2 ineligible evictions:',
+ f_bytes(arc_stats['evict_l2_ineligible']))
+ print()
+@@ -851,20 +851,20 @@ def section_l2arc(kstats_dict):
+ f_perc(arc_stats['l2_hdr_size'], arc_stats['l2_size']),
+ f_bytes(arc_stats['l2_hdr_size']))
+ prt_i2('MFU allocated size:',
+- f_perc(arc_stats['l2_mfu_asize'], arc_stats['l2_asize']),
+- f_bytes(arc_stats['l2_mfu_asize']))
++ f_perc(arc_stats.get('l2_mfu_asize', 0), arc_stats['l2_asize']),
++ f_bytes(arc_stats.get('l2_mfu_asize', 0))) # 2.0 module compat
+ prt_i2('MRU allocated size:',
+- f_perc(arc_stats['l2_mru_asize'], arc_stats['l2_asize']),
+- f_bytes(arc_stats['l2_mru_asize']))
++ f_perc(arc_stats.get('l2_mru_asize', 0), arc_stats['l2_asize']),
++ f_bytes(arc_stats.get('l2_mru_asize', 0))) # 2.0 module compat
+ prt_i2('Prefetch allocated size:',
+- f_perc(arc_stats['l2_prefetch_asize'], arc_stats['l2_asize']),
+- f_bytes(arc_stats['l2_prefetch_asize']))
++ f_perc(arc_stats.get('l2_prefetch_asize', 0), arc_stats['l2_asize']),
++ f_bytes(arc_stats.get('l2_prefetch_asize',0))) # 2.0 module compat
+ prt_i2('Data (buffer content) allocated size:',
+- f_perc(arc_stats['l2_bufc_data_asize'], arc_stats['l2_asize']),
+- f_bytes(arc_stats['l2_bufc_data_asize']))
++ f_perc(arc_stats.get('l2_bufc_data_asize', 0), arc_stats['l2_asize']),
++ f_bytes(arc_stats.get('l2_bufc_data_asize', 0))) # 2.0 module compat
+ prt_i2('Metadata (buffer content) allocated size:',
+- f_perc(arc_stats['l2_bufc_metadata_asize'], arc_stats['l2_asize']),
+- f_bytes(arc_stats['l2_bufc_metadata_asize']))
++ f_perc(arc_stats.get('l2_bufc_metadata_asize', 0), arc_stats['l2_asize']),
++ f_bytes(arc_stats.get('l2_bufc_metadata_asize', 0))) # 2.0 module compat
+
+ print()
+ prt_1('L2ARC breakdown:', f_hits(l2_access_total))
+diff --git a/cmd/arcstat.in b/cmd/arcstat.in
+index 8df1c62f7..833348d0e 100755
+--- a/cmd/arcstat.in
++++ b/cmd/arcstat.in
+@@ -565,8 +565,8 @@ def calculate():
+ v["el2skip"] = d["evict_l2_skip"] // sint
+ v["el2cach"] = d["evict_l2_cached"] // sint
+ v["el2el"] = d["evict_l2_eligible"] // sint
+- v["el2mfu"] = d["evict_l2_eligible_mfu"] // sint
+- v["el2mru"] = d["evict_l2_eligible_mru"] // sint
++ v["el2mfu"] = d.get("evict_l2_eligible_mfu", 0) // sint
++ v["el2mru"] = d.get("evict_l2_eligible_mru", 0) // sint
+ v["el2inel"] = d["evict_l2_ineligible"] // sint
+ v["mtxmis"] = d["mutex_miss"] // sint
+
+@@ -581,11 +581,11 @@ def calculate():
+ v["l2size"] = cur["l2_size"]
+ v["l2bytes"] = d["l2_read_bytes"] // sint
+
+- v["l2pref"] = cur["l2_prefetch_asize"]
+- v["l2mfu"] = cur["l2_mfu_asize"]
+- v["l2mru"] = cur["l2_mru_asize"]
+- v["l2data"] = cur["l2_bufc_data_asize"]
+- v["l2meta"] = cur["l2_bufc_metadata_asize"]
++ v["l2pref"] = cur.get("l2_prefetch_asize", 0)
++ v["l2mfu"] = cur.get("l2_mfu_asize", 0)
++ v["l2mru"] = cur.get("l2_mru_asize", 0)
++ v["l2data"] = cur.get("l2_bufc_data_asize", 0)
++ v["l2meta"] = cur.get("l2_bufc_metadata_asize", 0)
+ v["l2pref%"] = 100 * v["l2pref"] // v["l2asize"]
+ v["l2mfu%"] = 100 * v["l2mfu"] // v["l2asize"]
+ v["l2mru%"] = 100 * v["l2mru"] // v["l2asize"]
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Valmiky Arquissandas <kayvlim@gmail.com>
-Date: Fri, 8 Oct 2021 16:32:27 +0100
-Subject: [PATCH] arcstat: Fix integer division with python3
-
-The arcstat script requests compatibility with python2 and python3, but
-PEP 238 modified the / operator and results in erroneous output when
-run under python3.
-
-This commit replaces instances of / with //, yielding the expected
-result in both versions of Python.
-
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Reviewed-by: John Kennedy <john.kennedy@delphix.com>
-Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
-Signed-off-by: Valmiky Arquissandas <foss@kayvlim.com>
-Closes #12603
-(cherry picked from commit 2d02bba23d83ae8fede8d281edc255f01ccd28e9)
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- cmd/arcstat/arcstat.in | 66 +++++++++++++++++++++---------------------
- 1 file changed, 33 insertions(+), 33 deletions(-)
-
-diff --git a/cmd/arcstat/arcstat.in b/cmd/arcstat/arcstat.in
-index 0128fd817..d2b2e28d1 100755
---- a/cmd/arcstat/arcstat.in
-+++ b/cmd/arcstat/arcstat.in
-@@ -441,73 +441,73 @@ def calculate():
-
- v = dict()
- v["time"] = time.strftime("%H:%M:%S", time.localtime())
-- v["hits"] = d["hits"] / sint
-- v["miss"] = d["misses"] / sint
-+ v["hits"] = d["hits"] // sint
-+ v["miss"] = d["misses"] // sint
- v["read"] = v["hits"] + v["miss"]
-- v["hit%"] = 100 * v["hits"] / v["read"] if v["read"] > 0 else 0
-+ v["hit%"] = 100 * v["hits"] // v["read"] if v["read"] > 0 else 0
- v["miss%"] = 100 - v["hit%"] if v["read"] > 0 else 0
-
-- v["dhit"] = (d["demand_data_hits"] + d["demand_metadata_hits"]) / sint
-- v["dmis"] = (d["demand_data_misses"] + d["demand_metadata_misses"]) / sint
-+ v["dhit"] = (d["demand_data_hits"] + d["demand_metadata_hits"]) // sint
-+ v["dmis"] = (d["demand_data_misses"] + d["demand_metadata_misses"]) // sint
-
- v["dread"] = v["dhit"] + v["dmis"]
-- v["dh%"] = 100 * v["dhit"] / v["dread"] if v["dread"] > 0 else 0
-+ v["dh%"] = 100 * v["dhit"] // v["dread"] if v["dread"] > 0 else 0
- v["dm%"] = 100 - v["dh%"] if v["dread"] > 0 else 0
-
-- v["phit"] = (d["prefetch_data_hits"] + d["prefetch_metadata_hits"]) / sint
-+ v["phit"] = (d["prefetch_data_hits"] + d["prefetch_metadata_hits"]) // sint
- v["pmis"] = (d["prefetch_data_misses"] +
-- d["prefetch_metadata_misses"]) / sint
-+ d["prefetch_metadata_misses"]) // sint
-
- v["pread"] = v["phit"] + v["pmis"]
-- v["ph%"] = 100 * v["phit"] / v["pread"] if v["pread"] > 0 else 0
-+ v["ph%"] = 100 * v["phit"] // v["pread"] if v["pread"] > 0 else 0
- v["pm%"] = 100 - v["ph%"] if v["pread"] > 0 else 0
-
- v["mhit"] = (d["prefetch_metadata_hits"] +
-- d["demand_metadata_hits"]) / sint
-+ d["demand_metadata_hits"]) // sint
- v["mmis"] = (d["prefetch_metadata_misses"] +
-- d["demand_metadata_misses"]) / sint
-+ d["demand_metadata_misses"]) // sint
-
- v["mread"] = v["mhit"] + v["mmis"]
-- v["mh%"] = 100 * v["mhit"] / v["mread"] if v["mread"] > 0 else 0
-+ v["mh%"] = 100 * v["mhit"] // v["mread"] if v["mread"] > 0 else 0
- v["mm%"] = 100 - v["mh%"] if v["mread"] > 0 else 0
-
- v["arcsz"] = cur["size"]
- v["size"] = cur["size"]
- v["c"] = cur["c"]
-- v["mfu"] = d["mfu_hits"] / sint
-- v["mru"] = d["mru_hits"] / sint
-- v["mrug"] = d["mru_ghost_hits"] / sint
-- v["mfug"] = d["mfu_ghost_hits"] / sint
-- v["eskip"] = d["evict_skip"] / sint
-- v["el2skip"] = d["evict_l2_skip"] / sint
-- v["el2cach"] = d["evict_l2_cached"] / sint
-- v["el2el"] = d["evict_l2_eligible"] / sint
-- v["el2mfu"] = d["evict_l2_eligible_mfu"] / sint
-- v["el2mru"] = d["evict_l2_eligible_mru"] / sint
-- v["el2inel"] = d["evict_l2_ineligible"] / sint
-- v["mtxmis"] = d["mutex_miss"] / sint
-+ v["mfu"] = d["mfu_hits"] // sint
-+ v["mru"] = d["mru_hits"] // sint
-+ v["mrug"] = d["mru_ghost_hits"] // sint
-+ v["mfug"] = d["mfu_ghost_hits"] // sint
-+ v["eskip"] = d["evict_skip"] // sint
-+ v["el2skip"] = d["evict_l2_skip"] // sint
-+ v["el2cach"] = d["evict_l2_cached"] // sint
-+ v["el2el"] = d["evict_l2_eligible"] // sint
-+ v["el2mfu"] = d["evict_l2_eligible_mfu"] // sint
-+ v["el2mru"] = d["evict_l2_eligible_mru"] // sint
-+ v["el2inel"] = d["evict_l2_ineligible"] // sint
-+ v["mtxmis"] = d["mutex_miss"] // sint
-
- if l2exist:
-- v["l2hits"] = d["l2_hits"] / sint
-- v["l2miss"] = d["l2_misses"] / sint
-+ v["l2hits"] = d["l2_hits"] // sint
-+ v["l2miss"] = d["l2_misses"] // sint
- v["l2read"] = v["l2hits"] + v["l2miss"]
-- v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0
-+ v["l2hit%"] = 100 * v["l2hits"] // v["l2read"] if v["l2read"] > 0 else 0
-
- v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0
- v["l2asize"] = cur["l2_asize"]
- v["l2size"] = cur["l2_size"]
-- v["l2bytes"] = d["l2_read_bytes"] / sint
-+ v["l2bytes"] = d["l2_read_bytes"] // sint
-
- v["l2pref"] = cur["l2_prefetch_asize"]
- v["l2mfu"] = cur["l2_mfu_asize"]
- v["l2mru"] = cur["l2_mru_asize"]
- v["l2data"] = cur["l2_bufc_data_asize"]
- v["l2meta"] = cur["l2_bufc_metadata_asize"]
-- v["l2pref%"] = 100 * v["l2pref"] / v["l2asize"]
-- v["l2mfu%"] = 100 * v["l2mfu"] / v["l2asize"]
-- v["l2mru%"] = 100 * v["l2mru"] / v["l2asize"]
-- v["l2data%"] = 100 * v["l2data"] / v["l2asize"]
-- v["l2meta%"] = 100 * v["l2meta"] / v["l2asize"]
-+ v["l2pref%"] = 100 * v["l2pref"] // v["l2asize"]
-+ v["l2mfu%"] = 100 * v["l2mfu"] // v["l2asize"]
-+ v["l2mru%"] = 100 * v["l2mru"] // v["l2asize"]
-+ v["l2data%"] = 100 * v["l2data"] // v["l2asize"]
-+ v["l2meta%"] = 100 * v["l2meta"] // v["l2asize"]
-
- v["grow"] = 0 if cur["arc_no_grow"] else 1
- v["need"] = cur["arc_need_free"]
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <t.lamprecht@proxmox.com>
-Date: Wed, 10 Nov 2021 09:29:47 +0100
-Subject: [PATCH] arc stat/summary: guard access to l2arc MFU/MRU stats
-
-commit 085321621e79a75bea41c2b6511da6ebfbf2ba0a added printing MFU
-and MRU stats for 2.1 user space tools, but those keys are not
-available in the 2.0 module. That means it may break the arcstat and
-arc_summary tools after upgrade to 2.1 (user space), before a reboot
-to the new 2.1 ZFS kernel-module happened, due to python raising a
-KeyError on the dict access then.
-
-Move those two keys to a .get accessor with `0` as fallback, as it
-should be better to show some possible wrong data for new stat-keys
-than throwing an exception.
-
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-
-also move l2_mfu_asize l2_mru_asize l2_prefetch_asize
-l2_bufc_data_asize l2_bufc_metadata_asize to .get accessor
-(these are only present with a cache device in the pool)
-Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- cmd/arc_summary/arc_summary3 | 28 ++++++++++++++--------------
- cmd/arcstat/arcstat.in | 14 +++++++-------
- 2 files changed, 21 insertions(+), 21 deletions(-)
-
-diff --git a/cmd/arc_summary/arc_summary3 b/cmd/arc_summary/arc_summary3
-index 9d0c2d30d..fd2581ae2 100755
---- a/cmd/arc_summary/arc_summary3
-+++ b/cmd/arc_summary/arc_summary3
-@@ -609,13 +609,13 @@ def section_arc(kstats_dict):
- prt_i1('L2 cached evictions:', f_bytes(arc_stats['evict_l2_cached']))
- prt_i1('L2 eligible evictions:', f_bytes(arc_stats['evict_l2_eligible']))
- prt_i2('L2 eligible MFU evictions:',
-- f_perc(arc_stats['evict_l2_eligible_mfu'],
-+ f_perc(arc_stats.get('evict_l2_eligible_mfu', 0), # 2.0 module compat
- arc_stats['evict_l2_eligible']),
-- f_bytes(arc_stats['evict_l2_eligible_mfu']))
-+ f_bytes(arc_stats.get('evict_l2_eligible_mfu', 0)))
- prt_i2('L2 eligible MRU evictions:',
-- f_perc(arc_stats['evict_l2_eligible_mru'],
-+ f_perc(arc_stats.get('evict_l2_eligible_mru', 0), # 2.0 module compat
- arc_stats['evict_l2_eligible']),
-- f_bytes(arc_stats['evict_l2_eligible_mru']))
-+ f_bytes(arc_stats.get('evict_l2_eligible_mru', 0)))
- prt_i1('L2 ineligible evictions:',
- f_bytes(arc_stats['evict_l2_ineligible']))
- print()
-@@ -757,20 +757,20 @@ def section_l2arc(kstats_dict):
- f_perc(arc_stats['l2_hdr_size'], arc_stats['l2_size']),
- f_bytes(arc_stats['l2_hdr_size']))
- prt_i2('MFU allocated size:',
-- f_perc(arc_stats['l2_mfu_asize'], arc_stats['l2_asize']),
-- f_bytes(arc_stats['l2_mfu_asize']))
-+ f_perc(arc_stats.get('l2_mfu_asize', 0), arc_stats['l2_asize']),
-+ f_bytes(arc_stats.get('l2_mfu_asize', 0))) # 2.0 module compat
- prt_i2('MRU allocated size:',
-- f_perc(arc_stats['l2_mru_asize'], arc_stats['l2_asize']),
-- f_bytes(arc_stats['l2_mru_asize']))
-+ f_perc(arc_stats.get('l2_mru_asize', 0), arc_stats['l2_asize']),
-+ f_bytes(arc_stats.get('l2_mru_asize', 0))) # 2.0 module compat
- prt_i2('Prefetch allocated size:',
-- f_perc(arc_stats['l2_prefetch_asize'], arc_stats['l2_asize']),
-- f_bytes(arc_stats['l2_prefetch_asize']))
-+ f_perc(arc_stats.get('l2_prefetch_asize', 0), arc_stats['l2_asize']),
-+ f_bytes(arc_stats.get('l2_prefetch_asize',0))) # 2.0 module compat
- prt_i2('Data (buffer content) allocated size:',
-- f_perc(arc_stats['l2_bufc_data_asize'], arc_stats['l2_asize']),
-- f_bytes(arc_stats['l2_bufc_data_asize']))
-+ f_perc(arc_stats.get('l2_bufc_data_asize', 0), arc_stats['l2_asize']),
-+ f_bytes(arc_stats.get('l2_bufc_data_asize', 0))) # 2.0 module compat
- prt_i2('Metadata (buffer content) allocated size:',
-- f_perc(arc_stats['l2_bufc_metadata_asize'], arc_stats['l2_asize']),
-- f_bytes(arc_stats['l2_bufc_metadata_asize']))
-+ f_perc(arc_stats.get('l2_bufc_metadata_asize', 0), arc_stats['l2_asize']),
-+ f_bytes(arc_stats.get('l2_bufc_metadata_asize', 0))) # 2.0 module compat
-
- print()
- prt_1('L2ARC breakdown:', f_hits(l2_access_total))
-diff --git a/cmd/arcstat/arcstat.in b/cmd/arcstat/arcstat.in
-index d2b2e28d1..8004940b3 100755
---- a/cmd/arcstat/arcstat.in
-+++ b/cmd/arcstat/arcstat.in
-@@ -482,8 +482,8 @@ def calculate():
- v["el2skip"] = d["evict_l2_skip"] // sint
- v["el2cach"] = d["evict_l2_cached"] // sint
- v["el2el"] = d["evict_l2_eligible"] // sint
-- v["el2mfu"] = d["evict_l2_eligible_mfu"] // sint
-- v["el2mru"] = d["evict_l2_eligible_mru"] // sint
-+ v["el2mfu"] = d.get("evict_l2_eligible_mfu", 0) // sint
-+ v["el2mru"] = d.get("evict_l2_eligible_mru", 0) // sint
- v["el2inel"] = d["evict_l2_ineligible"] // sint
- v["mtxmis"] = d["mutex_miss"] // sint
-
-@@ -498,11 +498,11 @@ def calculate():
- v["l2size"] = cur["l2_size"]
- v["l2bytes"] = d["l2_read_bytes"] // sint
-
-- v["l2pref"] = cur["l2_prefetch_asize"]
-- v["l2mfu"] = cur["l2_mfu_asize"]
-- v["l2mru"] = cur["l2_mru_asize"]
-- v["l2data"] = cur["l2_bufc_data_asize"]
-- v["l2meta"] = cur["l2_bufc_metadata_asize"]
-+ v["l2pref"] = cur.get("l2_prefetch_asize", 0)
-+ v["l2mfu"] = cur.get("l2_mfu_asize", 0)
-+ v["l2mru"] = cur.get("l2_mru_asize", 0)
-+ v["l2data"] = cur.get("l2_bufc_data_asize", 0)
-+ v["l2meta"] = cur.get("l2_bufc_metadata_asize", 0)
- v["l2pref%"] = 100 * v["l2pref"] // v["l2asize"]
- v["l2mfu%"] = 100 * v["l2mfu"] // v["l2asize"]
- v["l2mru%"] = 100 * v["l2mru"] // v["l2asize"]
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Rich Ercolani <214141+rincebrain@users.noreply.github.com>
-Date: Sat, 26 Aug 2023 14:25:46 -0400
-Subject: [PATCH] Avoid save/restoring AMX registers to avoid a SPR erratum
-
-Intel SPR erratum SPR4 says that if you trip into a vmexit while
-doing FPU save/restore, your AMX register state might misbehave...
-and by misbehave, I mean save all zeroes incorrectly, leading to
-explosions if you restore it.
-
-Since we're not using AMX for anything, the simple way to avoid
-this is to just not save/restore those when we do anything, since
-we're killing preemption of any sort across our save/restores.
-
-If we ever decide to use AMX, it's not clear that we have any
-way to mitigate this, on Linux...but I am not an expert.
-
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
-Closes #14989
-Closes #15168
-(cherry picked from commit 277f2e587b085d1eb8aa48b4ac0768a9ef5745ab)
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- include/os/linux/kernel/linux/simd_x86.h | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/include/os/linux/kernel/linux/simd_x86.h b/include/os/linux/kernel/linux/simd_x86.h
-index 660f0d42d..455167ac8 100644
---- a/include/os/linux/kernel/linux/simd_x86.h
-+++ b/include/os/linux/kernel/linux/simd_x86.h
-@@ -157,6 +157,15 @@
- #endif
- #endif
-
-+#ifndef XFEATURE_MASK_XTILE
-+/*
-+ * For kernels where this doesn't exist yet, we still don't want to break
-+ * by save/restoring this broken nonsense.
-+ * See issue #14989 or Intel errata SPR4 for why
-+ */
-+#define XFEATURE_MASK_XTILE 0x60000
-+#endif
-+
- #include <linux/mm.h>
- #include <linux/slab.h>
-
-@@ -319,18 +328,18 @@ kfpu_begin(void)
- union fpregs_state *state = zfs_kfpu_fpregs[smp_processor_id()];
- #if defined(HAVE_XSAVES)
- if (static_cpu_has(X86_FEATURE_XSAVES)) {
-- kfpu_do_xsave("xsaves", &state->xsave, ~0);
-+ kfpu_do_xsave("xsaves", &state->xsave, ~XFEATURE_MASK_XTILE);
- return;
- }
- #endif
- #if defined(HAVE_XSAVEOPT)
- if (static_cpu_has(X86_FEATURE_XSAVEOPT)) {
-- kfpu_do_xsave("xsaveopt", &state->xsave, ~0);
-+ kfpu_do_xsave("xsaveopt", &state->xsave, ~XFEATURE_MASK_XTILE);
- return;
- }
- #endif
- if (static_cpu_has(X86_FEATURE_XSAVE)) {
-- kfpu_do_xsave("xsave", &state->xsave, ~0);
-+ kfpu_do_xsave("xsave", &state->xsave, ~XFEATURE_MASK_XTILE);
- } else if (static_cpu_has(X86_FEATURE_FXSR)) {
- kfpu_save_fxsr(&state->fxsave);
- } else {
-@@ -415,12 +424,12 @@ kfpu_end(void)
- union fpregs_state *state = zfs_kfpu_fpregs[smp_processor_id()];
- #if defined(HAVE_XSAVES)
- if (static_cpu_has(X86_FEATURE_XSAVES)) {
-- kfpu_do_xrstor("xrstors", &state->xsave, ~0);
-+ kfpu_do_xrstor("xrstors", &state->xsave, ~XFEATURE_MASK_XTILE);
- goto out;
- }
- #endif
- if (static_cpu_has(X86_FEATURE_XSAVE)) {
-- kfpu_do_xrstor("xrstor", &state->xsave, ~0);
-+ kfpu_do_xrstor("xrstor", &state->xsave, ~XFEATURE_MASK_XTILE);
- } else if (static_cpu_has(X86_FEATURE_FXSR)) {
- kfpu_restore_fxsr(&state->fxsave);
- } else {
---
-2.39.2
-
0006-dont-symlink-zed-scripts.patch
0007-Add-systemd-unit-for-importing-specific-pools.patch
0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
-0009-arcstat-Fix-integer-division-with-python3.patch
-0010-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
-0011-Avoid-save-restoring-AMX-registers-to-avoid-a-SPR-er.patch
+0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
-Subproject commit eb62221ff0f9efbc2ab826ec6f1388c5f05fb664
+Subproject commit 95785196f26e92d82cf4445654ba84e4a9671c57