Commit abd59af
DLPX-88427 Fix garbage stat names in estat metaslab-alloc BPF program
Fix the root cause in the BPF program instead of filtering output in a
wrapper script:
- Add a vd_name validity guard in metaslab_group_alloc_exit: if the first
byte falls outside printable ASCII (0x20-0x7e), a kernel bug has written
raw memory bytes into the name field; replace with "unknown" so we never
emit unparseable metric names to Telegraf or interactive users.
- Add #define __LINUX_SECURITY_H before the ZFS includes to block the
transitive chain metaslab.h->spa.h->zfs_context.h->vfs.h->security.h
->bpf.h, which on kernel 6.14 causes a compile error due to
sizeof(struct bpf_wq) on an incomplete type (DLPX-96701 class fix).
Blocking security.h is more conservative than blocking bpf.h itself
since the metaslab tracer does not need the security subsystem headers.
Remove telegraf/metaslab-alloc-stats.sh and restore telegraf.inputs.playbook
to invoke estat directly, since the BPF-level fix makes the grep filter
unnecessary.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent 9408dc6 commit abd59af
3 files changed
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | | - | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
0 commit comments