mirror_zfs/tests/zfs-tests/include
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
..
.gitignore Add zpool events tests 2017-05-22 12:34:42 -04:00
blkdev.shlib tests: include: use already-set $UNAME instead of shelling out to uname each time 2022-04-01 18:02:59 -07:00
commands.cfg Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
default.cfg.in tests: standardise on no-arg uname with *) case for illumos 2022-04-01 17:54:52 -07:00
libtest.shlib zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
math.shlib tests: include: math: simplify bc conditions, review $? 2022-04-01 17:59:24 -07:00
properties.shlib Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
tunables.cfg zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
zpool_script.shlib tests: review every awk(1) invocation 2022-04-01 17:57:55 -07:00