Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-10-30 23:14:59 +00:00
|
|
|
.PATH: ${ZFSSRC}
|
2017-10-29 05:27:22 +00:00
|
|
|
.PATH: ${SYSDIR}/crypto/skein
|
2020-10-12 22:19:07 +00:00
|
|
|
.PATH: ${ZFSOSSRC}/spl
|
|
|
|
.PATH: ${OZFS}/module/zstd/lib
|
2020-10-13 02:36:16 +00:00
|
|
|
ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c
|
|
|
|
ZFSSRC+= zstd_shim.c zstd.c
|
|
|
|
CFLAGS+= -DHAS_ZSTD_ZFS
|
2020-10-12 22:19:07 +00:00
|
|
|
SRCS+= ${ZFSSRC}
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
|
2017-11-10 23:54:58 +00:00
|
|
|
CFLAGS+= -I${LDRSRC}
|
2017-10-29 05:27:22 +00:00
|
|
|
CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
|
|
|
|
CFLAGS+= -I${SYSDIR}/crypto/skein
|
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
|
2020-10-12 22:19:07 +00:00
|
|
|
ZFS_EARLY= -I${ZFSOSINC} \
|
|
|
|
-I${ZFSOSINC}/spl \
|
|
|
|
-I${ZFSOSINC}/zfs
|
|
|
|
|
|
|
|
.for i in ${ZFSSRC}
|
|
|
|
CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
CFLAGS_EARLY.list.c+= ${ZFS_EARLY}
|
|
|
|
CFLAGS_EARLY.zstd_shim.c+= ${ZFS_EARLY}
|
|
|
|
|
|
|
|
# Can't use the early flags because there's two conflicting definitions of boolean_t in
|
|
|
|
# the zfs code that need to be unified.
|
|
|
|
CFLAGS.nvlist.c+= -I${ZFSOSINC}/spl
|
|
|
|
CFLAGS.zfs.c+= -I${ZFSOSINC}/spl \
|
|
|
|
-I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
|
2020-10-13 04:37:57 +00:00
|
|
|
CFLAGS.zstd.c+= -U__BMI__
|
2020-10-12 22:19:07 +00:00
|
|
|
CFLAGS.zstd_shim.c+= -DIN_BASE -I${OZFS}/include
|
|
|
|
|
2020-08-26 17:52:32 +00:00
|
|
|
# Do not unroll skein loops, reduce code size
|
|
|
|
CFLAGS.skein_block.c+= -DSKEIN_LOOP=111
|
2020-10-12 22:19:07 +00:00
|
|
|
|
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by
"bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, the bootonce setting is reset on attempt to boot and the next
boot will use previously active BE.
By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will
be set permanently active.
bootonce dataset name is recorded in boot pool labels, bootenv area.
in case of nextboot, the nextboot_enable boolean variable is recorded in
freebsd:nvstore nvlist, also stored in boot pool label bootenv area.
On boot, the loader will process /boot/nextboot.conf if nextboot_enable
is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf
processing on next boot.
bootonce and nextboot features are usable in both UEFI and BIOS boot.
To use bootonce/nextboot features, the boot loader needs to be updated on disk;
if loader.efi is stored on ESP, then ESP needs to be updated and
for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated
(gpart or other tools).
At this time, only lua loader is updated.
Sponsored by: Netflix, Klara Inc.
Differential Revision: https://reviews.freebsd.org/D25512
2020-09-21 09:01:10 +00:00
|
|
|
CFLAGS+= -I${SYSDIR}/contrib/openzfs/include
|
|
|
|
CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
|
|
|
|
CFLAGS.zfs.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4
|
2019-11-02 12:28:04 +00:00
|
|
|
|
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
2008-11-17 20:49:29 +00:00
|
|
|
CFLAGS+= -Wformat -Wall
|