zfs/lib/libspl/include/sys
Will Andrews 4ed5e25074 Add Linux namespace delegation support
This allows ZFS datasets to be delegated to a user/mount namespace
Within that namespace, only the delegated datasets are visible
Works very similarly to Zones/Jailes on other ZFS OSes

As a user:
```
 $ unshare -Um
 $ zfs list
no datasets available
 $ echo $$
1234
```

As root:
```
 # zfs list
NAME                            ZONED  MOUNTPOINT
containers                      off    /containers
containers/host                 off    /containers/host
containers/host/child           off    /containers/host/child
containers/host/child/gchild    off    /containers/host/child/gchild
containers/unpriv               on     /unpriv
containers/unpriv/child         on     /unpriv/child
containers/unpriv/child/gchild  on     /unpriv/child/gchild

 # zfs zone /proc/1234/ns/user containers/unpriv
```

Back to the user namespace:
```
 $ zfs list
NAME                             USED  AVAIL     REFER  MOUNTPOINT
containers                       129M  47.8G       24K  /containers
containers/unpriv                128M  47.8G       24K  /unpriv
containers/unpriv/child          128M  47.8G      128M  /unpriv/child
```

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Will Andrews <will.andrews@klarasystems.com>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com>
Co-authored-by: Allan Jude <allan@klarasystems.com>
Co-authored-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com>
Sponsored-by: Buddy <https://buddy.works>
Closes #12263
2022-06-10 09:51:46 -07:00
..
dktp autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
acl.h Cross-platform acltype 2020-10-13 21:25:48 -07:00
acl_impl.h Add linux libspl support 2010-08-31 13:41:59 -07:00
callb.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
cmn_err.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
cred.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
debug.h Replace ASSERTV macro with compiler annotation 2019-12-05 12:37:00 -08:00
dkio.h Remove unnecessary references to slavery 2020-06-10 17:07:59 -07:00
dklabel.h Removed duplicated includes 2021-03-22 12:34:58 -07:00
feature_tests.h Use _Noreturn (C11; GNU89) properly 2022-03-04 16:25:22 -08:00
inttypes.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
isa_defs.h Handle aarch64 defines seperate from arm 2022-03-07 17:49:34 -08:00
kmem.h libspl: kmem.h: mark unused kmem_*() macro arguments used 2021-12-23 09:36:12 -08:00
kstat.h libspl/include: remove unused/empty headers 2022-05-18 12:10:43 -07:00
list.h Add linux libspl support 2010-08-31 13:41:59 -07:00
list_impl.h change libspl list member names to match kernel 2020-04-23 15:53:14 -07:00
mhd.h Add linux libspl support 2010-08-31 13:41:59 -07:00
mkdev.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
policy.h Illumos 3897 - zfs filesystem and snapshot limits 2015-04-28 16:22:51 -07:00
poll.h Fix header inclusions for standards conformance 2017-04-12 08:58:09 -07:00
priv.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
processor.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
sha2.h module: icp: remove unused (and mostly faked) cm_{{min,max}_key_length,mech_flags} 2022-02-15 16:25:52 -08:00
simd.h Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
stack.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
stdtypes.h Update build system and packaging 2018-05-29 16:00:33 -07:00
string.h Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
sunddi.h Add linux libspl support 2010-08-31 13:41:59 -07:00
systeminfo.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
time.h Linux 5.6 compat: time_t 2020-02-27 09:31:02 -08:00
trace_spl.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
trace_zfs.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
types.h Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
types32.h Update build system and packaging 2018-05-29 16:00:33 -07:00
uio.h Extending FreeBSD UIO Struct 2021-01-20 21:27:30 -08:00
vnode.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
wmsum.h Introduce write-mostly sums 2021-05-27 14:27:29 -06:00
zone.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00