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
F132324131: D23765.id68563.diff
Wed, Oct 15, 9:59 PM
Unknown Object (File)
Tue, Sep 30, 8:34 AM
Unknown Object (File)
Sun, Sep 21, 3:02 AM
Unknown Object (File)
Sat, Sep 20, 7:47 PM
Unknown Object (File)
Wed, Sep 17, 10:58 PM
Unknown Object (File)
Sep 4 2025, 8:51 AM
Unknown Object (File)
Aug 31 2025, 8:25 PM
Unknown Object (File)
Aug 30 2025, 7:16 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