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)
Mon, Feb 17, 3:41 PM
Unknown Object (File)
Tue, Feb 4, 1:14 PM
Unknown Object (File)
Wed, Jan 29, 2:13 PM
Unknown Object (File)
Dec 20 2024, 12:18 PM
Unknown Object (File)
Nov 12 2024, 7:03 PM
Unknown Object (File)
Sep 24 2024, 4:26 AM
Unknown Object (File)
Sep 23 2024, 7:40 PM
Unknown Object (File)
Sep 23 2024, 2:43 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