zfs/module/os/linux/spl
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
..
README.md Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
THIRDPARTYLICENSE.gplv2 OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
THIRDPARTYLICENSE.gplv2.descrip OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
spl-atomic.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-condvar.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-cred.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
spl-err.c spl: make 'spl_panic_halt' working for all cases 2022-02-18 11:43:11 -08:00
spl-generic.c Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
spl-kmem-cache.c Fix functions without a prototype 2022-05-06 11:57:37 -07:00
spl-kmem.c Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
spl-kstat.c Linux 5.17 compat: PDE_DATA() renamed to pde_data() 2022-01-25 12:53:00 -08:00
spl-proc.c Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
spl-procfs-list.c Linux 5.17 compat: PDE_DATA() renamed to pde_data() 2022-01-25 12:53:00 -08:00
spl-taskq.c module: icp: remove other provider types 2022-02-15 16:23:53 -08:00
spl-thread.c Switch from _Noreturn to __attribute__((noreturn)) 2022-03-23 08:51:00 -07:00
spl-trace.c Add tracepoints for taskq entry lifetime events 2019-11-01 13:14:54 -07:00
spl-tsd.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-vmem.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-xdr.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
spl-zlib.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-zone.c Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00

README.md

The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the OpenZFS project.

Installation

The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197