libspl: Provide platform-specific zone implementations
authorRyan Moeller <freqlabs@FreeBSD.org>
Sun, 30 Aug 2020 17:37:44 +0000 (17:37 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 1 Sep 2020 02:43:30 +0000 (19:43 -0700)
commit46b7d53baf1c17f006a0ff6a8efb01e48ac248bf
treefed42666da7d08cea7e780677412d4245d30696d
parenteff621071ffd33764b833ea16894bee47d6ffb34
libspl: Provide platform-specific zone implementations

FreeBSD has the concept of jails, a precursor to Solaris's zones, which
can be mapped to the required zones interface with relative ease.  The
previous ZFS implementation in FreeBSD did so, and we should continue
to provide an appropriate implementation in OpenZFS as well.

Move lib/libspl/zone.c into platform code and adopt the correct
implementation for FreeBSD.

While here, prune unused code.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #10851
lib/libspl/Makefile.am
lib/libspl/include/zone.h
lib/libspl/os/freebsd/zone.c [new file with mode: 0644]
lib/libspl/os/linux/zone.c [moved from lib/libspl/zone.c with 65% similarity]