]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for compressed kernel dumps.
authormarkj <markj@FreeBSD.org>
Wed, 25 Oct 2017 00:51:00 +0000 (00:51 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 25 Oct 2017 00:51:00 +0000 (00:51 +0000)
commita049a758b2cfdeae5e960df19a9a3e3a04e32e38
treee9cdb0a8780646580c9a0d35fd94332c6a2443ad
parent1f73004f8d4b3f3eb24c6f6220f4d5c1d6252c60
Add support for compressed kernel dumps.

When using a kernel built with the GZIO config option, dumpon -z can be
used to configure gzip compression using the in-kernel copy of zlib.
This is useful on systems with large amounts of RAM, which require a
correspondingly large dump device. Recovery of compressed dumps is also
faster since fewer bytes need to be copied from the dump device.

Because we have no way of knowing the final size of a compressed dump
until it is written, the kernel will always attempt to dump when
compression is configured, regardless of the dump device size. If the
dump is aborted because we run out of space, an error is reported on
the console.

savecore(8) is modified to handle compressed dumps and save them to
vmcore.<index>.gz, as it does when given the -z option.

A new rc.conf variable, dumpon_flags, is added. Its value is added to
the boot-time dumpon(8) invocation that occurs when a dump device is
configured in rc.conf.

Reviewed by: cem (earlier version)
Discussed with: def, rgrimes
Relnotes: yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11723
15 files changed:
etc/defaults/rc.conf
etc/rc.d/dumpon
sbin/dumpon/dumpon.8
sbin/dumpon/dumpon.c
sbin/savecore/savecore.8
sbin/savecore/savecore.c
share/man/man5/rc.conf.5
sys/dev/null/null.c
sys/geom/geom_dev.c
sys/kern/kern_gzio.c
sys/kern/kern_shutdown.c
sys/sys/conf.h
sys/sys/disk.h
sys/sys/gzio.h
sys/sys/kerneldump.h