Page MenuHomeFreeBSD

clamp kernel dump compression level when using gzip
ClosedPublic

Authored by vangyzen on Feb 19 2020, 10:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 8:48 AM
Unknown Object (File)
Feb 21 2024, 4:59 AM
Unknown Object (File)
Dec 23 2023, 12:07 AM
Unknown Object (File)
Nov 27 2023, 9:13 PM
Unknown Object (File)
Nov 15 2023, 4:07 PM
Unknown Object (File)
Oct 19 2023, 6:53 PM
Unknown Object (File)
Oct 4 2023, 3:38 AM
Unknown Object (File)
Aug 13 2023, 8:08 PM
Subscribers

Details

Summary

If the configured compression level for kernel dumps
it outside the supported range, clamp it to the closest
supported level. Previously, dumpon would fail.

zstd already does this internally, so the compressor
needs no change.

Test Plan

Here are the vmcore.N.gz sizes for a few configured levels:

-2 30983609 clamped to 1
-1 28151699 in zlib, -1 selects the default, which is 6
 0 31335591 clamped to 1; 0 is valid, but makes no sense
 1 31396046
 9 28064805
10 28010073 clamped to 9

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable