This change replaces the current kern_gzio.c with a more general callback-based interface, and converts the existing userland core compression code to use it.
The interface is in sys/gzio.h. It currently only supports compression, no decompression.
This change also modifies the kernel configuration needed to enable userland core compression support. Before, you needed
device gzio
options COMPRESS_USER_CORES
now it's just
options GZIO
with a sysctl, kern.compress_user_cores, which defaults to off when GZIO is defined.
TODO:
- write a small man page for this interface
- the interface needs some affordances to make it easy to implement decompression support if someone wants it later on - probably an extra flag parameter to kern_gz_init() is sufficient
- the kernel config changes might warrant an UPDATING entry
I'll work on these over the next few days if the overall approach seems reasonable.