loader: zstd based filesystem, zstdfs like gzipfs

Off by default.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh committed 2026-07-11 13:28:47 -06:00
1 parent 86d719ae68
commit c61ee49cd0
7 files changed
+28

No files matched your search

+1
View File
@@ -57,6 +57,7 @@ struct devsw *devsw[] = {
struct fs_ops *file_system[] = {
#ifdef EFI_ZFS_BOOT
&zfs_fsops,
&zstdfs_fsops,
#endif
&dosfs_fsops,
&ufs_fsops,
+1
View File
@@ -62,6 +62,7 @@ struct devsw *devsw[] = {
struct fs_ops *file_system[] = {
#if defined(LOADER_ZFS_SUPPORT)
&zfs_fsops,
&zstdfs_fsops,
#endif
#if defined(LOADER_UFS_SUPPORT)
&ufs_fsops,
+4
View File
@@ -85,11 +85,15 @@ struct fs_ops *file_system[] = {
#if defined(LOADER_BZIP2_SUPPORT)
&bzipfs_fsops,
#endif
#if defined(LOADER_XZ_SUPPORT)
&xzfs_fsops,
#endif
#if defined(LOADER_MSDOS_SUPPORT)
&dosfs_fsops,
#endif
#if defined(LOADER_ZFS_SUPPORT)
&zfs_fsops,
&zstdfs_fsops,
#endif
&hostfs_fsops,
NULL
+6
View File
@@ -192,6 +192,12 @@ SRCS+= g_eli_hmac.c pkcs5v2.c
# Maybe ZFS
.if ${MK_LOADER_ZFS} == "yes"
.include "${SASRC}/zfs/Makefile.inc"
# zstdfs.c is a stacked filesystem for .zst files, like gzipfs.c/bzipfs.c
# above; it's only buildable here because zfs/Makefile.inc already pulled
# the zstd decompressor in for ZFS's on-disk compression.
SRCS+= zstdfs.c
CFLAGS.zstdfs.c+= ${ZSTD_CFLAGS}
.endif
# Crypto hashing functions
+14
View File
@@ -781,6 +781,20 @@ The same as
but for
.Xr bzip2 1 Ns -compressed
files.
.It Va xzfs_fsops
The same as
.Va gzipfs_fsops ,
but for
.Xr xz 1 Ns -compressed
files.
.It Va zstdfs_fsops
The same as
.Va gzipfs_fsops ,
but for
.Xr zstd 1 Ns -compressed
files.
Only available when built with ZFS support, since that is the only
source of the zstd decompressor in the boot loader environment.
.It Va pkgfs_fsops
File access from a tar file typically streamed via TFTP.
The order of files in the tar file must match the order they are
+1
View File
@@ -131,6 +131,7 @@ extern struct fs_ops cd9660_fsops;
extern struct fs_ops gzipfs_fsops;
extern struct fs_ops bzipfs_fsops;
extern struct fs_ops xzfs_fsops;
extern struct fs_ops zstdfs_fsops;
extern struct fs_ops dosfs_fsops;
extern struct fs_ops ext2fs_fsops;
extern struct fs_ops splitfs_fsops;
+1
View File
@@ -67,6 +67,7 @@ struct fs_ops *file_system[] = {
&cd9660_fsops,
#if defined(USERBOOT_ZFS_SUPPORT)
&zfs_fsops,
&zstdfs_fsops,
#endif
&gzipfs_fsops,
&bzipfs_fsops,