Skip to content

Commit 2a58b31

Browse files
committed
Notable upstream pull request merges: #12194 Fix short-lived txg caused by autotrim #13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() #13392 Implementation of block cloning for ZFS #13741 SHA2 reworking and API for iterating over multiple implementations #14282 Sync thread should avoid holding the spa config write lock when possible #14283 txg_sync should handle write errors in ZIL #14359 More adaptive ARC eviction #14469 Fix NULL pointer dereference in zio_ready() #14479 zfs redact fails when dnodesize=auto #14496 improve error message of zfs redact #14500 Skip memory allocation when compressing holes #14501 FreeBSD: don't verify recycled vnode for zfs control directory #14502 partially revert PR 14304 (eee9362) #14509 Fix per-jail zfs.mount_snapshot setting #14514 Fix data race between zil_commit() and zil_suspend() #14516 System-wide speculative prefetch limit #14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode() #14519 Do not hold spa_config in ZIL while blocked on IO #14523 Move dmu_buf_rele() after dsl_dataset_sync_done() #14524 Ignore too large stack in case of dsl_deadlist_merge #14526 Use .section .rodata instead of .rodata on FreeBSD #14528 ICP: AES-GCM: Refactor gcm_clear_ctx() #14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx() #14532 Handle unexpected errors in zil_lwb_commit() without ASSERT() #14544 icp: Prevent compilers from optimizing away memset() in gcm_clear_ctx() #14546 Revert zfeature_active() to static #14556 Remove bad kmem_free() oversight from previous zfsdev_state_list patch #14563 Optimize the is_l2cacheable functions #14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier #14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL #14567 spl: Add cmn_err_once() to log a message only on the first call #14568 Fix incremental receive silently failing for recursive sends #14569 Restore ASMABI and other Unify work #14576 Fix detection of IBM Power8 machines (ISA 2.07) #14577 Better handling for future crypto parameters #14600 zcommon: Refactor FPU state handling in fletcher4 #14603 Fix prefetching of indirect blocks while destroying #14633 Fixes in persistent error log #14639 FreeBSD: Remove extra arc_reduce_target_size() call #14641 Additional limits on hole reporting #14649 Drop lying to the compiler in the fletcher4 code #14652 panic loop when removing slog device #14653 Update vdev state for spare vdev #14655 Fix cloning into already dirty dbufs #14678 Revert "Do not hold spa_config in ZIL while blocked on IO" Obtained from: OpenZFS OpenZFS commit: 431083f
2 parents b98fbf3 + 431083f commit 2a58b31

File tree

332 files changed

+47407
-17330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+47407
-17330
lines changed

cddl/lib/libicp/Makefile

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ PACKAGE= zfs
66
LIB= icp
77
LIBADD=
88

9-
109
.if ${MACHINE_ARCH} == "amd64"
1110
ASM_SOURCES_C = asm-x86_64/aes/aeskey.c
1211
ASM_SOURCES_AS = \
@@ -15,30 +14,47 @@ ASM_SOURCES_AS = \
1514
asm-x86_64/modes/gcm_pclmulqdq.S \
1615
asm-x86_64/modes/aesni-gcm-x86_64.S \
1716
asm-x86_64/modes/ghash-x86_64.S \
18-
asm-x86_64/sha2/sha256_impl.S \
19-
asm-x86_64/sha2/sha512_impl.S \
17+
asm-x86_64/sha2/sha256-x86_64.S \
18+
asm-x86_64/sha2/sha512-x86_64.S \
2019
asm-x86_64/blake3/blake3_avx2.S \
2120
asm-x86_64/blake3/blake3_avx512.S \
2221
asm-x86_64/blake3/blake3_sse2.S \
2322
asm-x86_64/blake3/blake3_sse41.S
2423

2524
CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES
25+
.elif ${MACHINE_ARCH} == "armv7"
26+
ASM_SOURCES_C =
27+
ASM_SOURCES_AS = \
28+
asm-arm/sha2/sha256-armv7.S \
29+
asm-arm/sha2/sha512-armv7.S
2630
.elif ${MACHINE_ARCH} == "aarch64"
2731
ASM_SOURCES_C =
2832
ASM_SOURCES_AS = \
2933
asm-aarch64/blake3/b3_aarch64_sse2.S \
30-
asm-aarch64/blake3/b3_aarch64_sse41.S
34+
asm-aarch64/blake3/b3_aarch64_sse41.S \
35+
asm-aarch64/sha2/sha256-armv8.S \
36+
asm-aarch64/sha2/sha512-armv8.S
37+
.elif ${MACHINE_ARCH} == "powerpc64"
38+
ASM_SOURCES_C =
39+
ASM_SOURCES_AS = \
40+
asm-ppc64/sha2/sha256-ppc.S \
41+
asm-ppc64/sha2/sha512-ppc.S \
42+
asm-ppc64/sha2/sha256-p8.S \
43+
asm-ppc64/sha2/sha512-p8.S
3144
.elif ${MACHINE_ARCH} == "powerpc64le"
3245
ASM_SOURCES_C =
3346
ASM_SOURCES_AS = \
3447
asm-ppc64/blake3/b3_ppc64le_sse2.S \
35-
asm-ppc64/blake3/b3_ppc64le_sse41.S
48+
asm-ppc64/blake3/b3_ppc64le_sse41.S \
49+
asm-ppc64/sha2/sha256-ppc.S \
50+
asm-ppc64/sha2/sha512-ppc.S \
51+
asm-ppc64/sha2/sha256-p8.S \
52+
asm-ppc64/sha2/sha512-p8.S
3653
.else
3754
ASM_SOURCES_C =
3855
ASM_SOURCES_AS =
3956
.endif
4057

41-
4258
KERNEL_C = \
4359
spi/kcf_spi.c \
4460
api/kcf_ctxops.c \
@@ -52,7 +68,6 @@ KERNEL_C = \
5268
algs/blake3/blake3.c \
5369
algs/blake3/blake3_generic.c \
5470
algs/blake3/blake3_impl.c \
55-
algs/blake3/blake3_x86-64.c \
5671
algs/edonr/edonr.c \
5772
algs/modes/modes.c \
5873
algs/modes/cbc.c \
@@ -62,7 +77,9 @@ KERNEL_C = \
6277
algs/modes/ctr.c \
6378
algs/modes/ccm.c \
6479
algs/modes/ecb.c \
65-
algs/sha2/sha2.c \
80+
algs/sha2/sha2_generic.c \
81+
algs/sha2/sha256_impl.c \
82+
algs/sha2/sha512_impl.c \
6683
algs/skein/skein.c \
6784
algs/skein/skein_block.c \
6885
algs/skein/skein_iv.c \
@@ -77,10 +94,8 @@ KERNEL_C = \
7794
core/kcf_prov_tabs.c \
7895
$(ASM_SOURCES_C)
7996

80-
81-
82-
83-
97+
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs
98+
KERNEL_C+= zfs_impl.c
8499

85100
SRCS= $(ASM_SOURCES_AS) $(KERNEL_C)
86101

@@ -98,22 +113,29 @@ CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccomp
98113
CFLAGS+= -DHAVE_ISSETUGID
99114
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
100115

101-
102116
CFLAGS.aes_amd64.S+= -DLOCORE
103117
CFLAGS.aes_aesni.S+= -DLOCORE
104118
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
105119
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
106120
CFLAGS.ghash-x86_64.S+= -DLOCORE
107-
CFLAGS.sha256_impl.S+= -DLOCORE
108-
CFLAGS.sha512_impl.S+= -DLOCORE
121+
CFLAGS.sha256-x86_64.S+= -DLOCORE
122+
CFLAGS.sha512-x86_64.S+= -DLOCORE
109123
CFLAGS.blake3_avx2.S = -DLOCORE
110124
CFLAGS.blake3_avx512.S = -DLOCORE
111125
CFLAGS.blake3_sse2.S = -DLOCORE
112126
CFLAGS.blake3_sse41.S = -DLOCORE
113127
CFLAGS.b3_aarch64_sse2.S = -DLOCORE
114128
CFLAGS.b3_aarch64_sse41.S = -DLOCORE
129+
CFLAGS.sha256-armv7.S = -DLOCORE
130+
CFLAGS.sha256-armv8.S = -DLOCORE
131+
CFLAGS.sha512-armv7.S = -DLOCORE
132+
CFLAGS.sha512-armv8.S = -DLOCORE
115133
CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
116134
CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
135+
CFLAGS.sha256-p8.S = -DLOCORE
136+
CFLAGS.sha256-ppc.S = -DLOCORE
137+
CFLAGS.sha512-p8.S = -DLOCORE
138+
CFLAGS.sha512-ppc.S = -DLOCORE
117139

118140

119141
LDFLAGS.bfd+= -Wl,-znoexecstack

cddl/lib/libicp_rescue/Makefile

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,54 @@ PACKAGE= utilities
66
LIB= icp_rescue
77
LIBADD=
88

9-
109
.if ${MACHINE_ARCH} == "amd64"
1110
ASM_SOURCES_C = asm-x86_64/aes/aeskey.c
1211
ASM_SOURCES_AS = \
1312
asm-x86_64/aes/aes_amd64.S \
1413
asm-x86_64/aes/aes_aesni.S \
1514
asm-x86_64/modes/gcm_pclmulqdq.S \
1615
asm-x86_64/modes/aesni-gcm-x86_64.S \
17-
asm-x86_64/sha2/sha256_impl.S \
18-
asm-x86_64/sha2/sha512_impl.S \
16+
asm-x86_64/sha2/sha256-x86_64.S \
17+
asm-x86_64/sha2/sha512-x86_64.S \
1918
asm-x86_64/blake3/blake3_avx2.S \
2019
asm-x86_64/blake3/blake3_avx512.S \
2120
asm-x86_64/blake3/blake3_sse2.S \
2221
asm-x86_64/blake3/blake3_sse41.S
2322

2423
CFLAGS+= -D__amd64 -D_SYS_STACK_H
24+
.elif ${MACHINE_ARCH} == "armv7"
25+
ASM_SOURCES_C =
26+
ASM_SOURCES_AS = \
27+
asm-arm/sha2/sha256-armv7.S \
28+
asm-arm/sha2/sha512-armv7.S
2529
.elif ${MACHINE_ARCH} == "aarch64"
2630
ASM_SOURCES_C =
2731
ASM_SOURCES_AS = \
2832
asm-aarch64/blake3/b3_aarch64_sse2.S \
29-
asm-aarch64/blake3/b3_aarch64_sse41.S
33+
asm-aarch64/blake3/b3_aarch64_sse41.S \
34+
asm-aarch64/sha2/sha256-armv8.S \
35+
asm-aarch64/sha2/sha512-armv8.S
36+
.elif ${MACHINE_ARCH} == "powerpc64"
37+
ASM_SOURCES_C =
38+
ASM_SOURCES_AS = \
39+
asm-ppc64/sha2/sha256-ppc.S \
40+
asm-ppc64/sha2/sha512-ppc.S \
41+
asm-ppc64/sha2/sha256-p8.S \
42+
asm-ppc64/sha2/sha512-p8.S
3043
.elif ${MACHINE_ARCH} == "powerpc64le"
3144
ASM_SOURCES_C =
3245
ASM_SOURCES_AS = \
3346
asm-ppc64/blake3/b3_ppc64le_sse2.S \
34-
asm-ppc64/blake3/b3_ppc64le_sse41.S
47+
asm-ppc64/blake3/b3_ppc64le_sse41.S \
48+
asm-ppc64/sha2/sha256-ppc.S \
49+
asm-ppc64/sha2/sha512-ppc.S \
50+
asm-ppc64/sha2/sha256-p8.S \
51+
asm-ppc64/sha2/sha512-p8.S
3552
.else
3653
ASM_SOURCES_C =
3754
ASM_SOURCES_AS =
3855
.endif
3956

40-
4157
KERNEL_C = \
4258
spi/kcf_spi.c \
4359
api/kcf_ctxops.c \
@@ -51,7 +67,6 @@ KERNEL_C = \
5167
algs/blake3/blake3.c \
5268
algs/blake3/blake3_generic.c \
5369
algs/blake3/blake3_impl.c \
54-
algs/blake3/blake3_x86-64.c \
5570
algs/edonr/edonr.c \
5671
algs/modes/modes.c \
5772
algs/modes/cbc.c \
@@ -61,7 +76,9 @@ KERNEL_C = \
6176
algs/modes/ctr.c \
6277
algs/modes/ccm.c \
6378
algs/modes/ecb.c \
64-
algs/sha2/sha2.c \
79+
algs/sha2/sha2_generic.c \
80+
algs/sha2/sha256_impl.c \
81+
algs/sha2/sha512_impl.c \
6582
algs/skein/skein_block.c \
6683
illumos-crypto.c \
6784
io/aes.c \
@@ -74,6 +91,9 @@ KERNEL_C = \
7491
core/kcf_prov_tabs.c \
7592
$(ASM_SOURCES_C)
7693

94+
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs
95+
KERNEL_C+= zfs_impl.c
96+
7797
SRCS= $(ASM_SOURCES_AS) $(KERNEL_C)
7898

7999
WARNS?= 2
@@ -90,24 +110,30 @@ CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccomp
90110
CFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE
91111
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
92112

93-
94113
CFLAGS.aes_amd64.S+= -DLOCORE
95114
CFLAGS.aes_aesni.S+= -DLOCORE
96115
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
97116
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
98117
CFLAGS.ghash-x86_64.S+= -DLOCORE
99-
CFLAGS.sha256_impl.S+= -DLOCORE
100-
CFLAGS.sha512_impl.S+= -DLOCORE
118+
CFLAGS.sha256-x86_64.S+= -DLOCORE
119+
CFLAGS.sha512-x86_64.S+= -DLOCORE
101120
CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM
102121
CFLAGS.blake3_avx2.S = -DLOCORE
103122
CFLAGS.blake3_avx512.S = -DLOCORE
104123
CFLAGS.blake3_sse2.S = -DLOCORE
105124
CFLAGS.blake3_sse41.S = -DLOCORE
106125
CFLAGS.b3_aarch64_sse2.S = -DLOCORE
107126
CFLAGS.b3_aarch64_sse41.S = -DLOCORE
127+
CFLAGS.sha256-armv7.S = -DLOCORE
128+
CFLAGS.sha512-armv7.S = -DLOCORE
129+
CFLAGS.sha256-armv8.S = -DLOCORE
130+
CFLAGS.sha512-armv8.S = -DLOCORE
108131
CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
109132
CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
110-
133+
CFLAGS.sha256-ppc.S = -DLOCORE
134+
CFLAGS.sha256-p8.S = -DLOCORE
135+
CFLAGS.sha512-ppc.S = -DLOCORE
136+
CFLAGS.sha512-p8.S = -DLOCORE
111137

112138
LDFLAGS.bfd+= -Wl,-znoexecstack
113139

cddl/lib/libzfs/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ USER_C += \
5555
os/freebsd/smb.c
5656

5757
KERNEL_C = \
58-
algs/sha2/sha2.c \
5958
cityhash.c \
6059
zfeature_common.c \
6160
zfs_comutil.c \

cddl/lib/libzpool/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ KERNEL_C = \
6262
bplist.c \
6363
bpobj.c \
6464
bptree.c \
65-
btree.c \
6665
bqueue.c \
66+
btree.c \
67+
brt.c \
6768
cityhash.c \
6869
dbuf.c \
6970
dbuf_stats.c \
@@ -117,7 +118,7 @@ KERNEL_C = \
117118
refcount.c \
118119
rrwlock.c \
119120
sa.c \
120-
sha256.c \
121+
sha2_zfs.c \
121122
skein_zfs.c \
122123
spa.c \
123124
spa_checkpoint.c \

cddl/usr.sbin/zdb/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CFLAGS+= \
2424
-include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \
2525
-DHAVE_ISSETUGID
2626

27-
LIBADD= nvpair umem uutil zfs spl avl zutil zpool
27+
LIBADD= nvpair umem uutil zfs spl avl zutil zpool crypto
2828

2929
CFLAGS.gcc+= -fms-extensions
3030
# Since there are many asserts in this program, it makes no sense to compile

cddl/usr.sbin/zfsd/case_file.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,7 @@ bool
490490
CaseFile::ActivateSpare() {
491491
nvlist_t *config, *nvroot, *parent_config;
492492
nvlist_t **spares;
493-
char *devPath, *vdev_type;
494-
const char *poolname;
493+
const char *devPath, *poolname, *vdev_type;
495494
u_int nspares, i;
496495
int error;
497496

@@ -518,7 +517,7 @@ CaseFile::ActivateSpare() {
518517

519518
parent_config = find_parent(config, nvroot, m_vdevGUID);
520519
if (parent_config != NULL) {
521-
char *parent_type;
520+
const char *parent_type;
522521

523522
/*
524523
* Don't activate spares for members of a "replacing" vdev.

cddl/usr.sbin/zfsd/vdev.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Vdev::Name(zpool_handle_t *zhp, bool verbose) const
336336
string
337337
Vdev::Path() const
338338
{
339-
char *path(NULL);
339+
const char *path(NULL);
340340

341341
if ((m_config != NULL)
342342
&& (nvlist_lookup_string(m_config, ZPOOL_CONFIG_PATH, &path) == 0))
@@ -348,7 +348,7 @@ Vdev::Path() const
348348
string
349349
Vdev::PhysicalPath() const
350350
{
351-
char *path(NULL);
351+
const char *path(NULL);
352352

353353
if ((m_config != NULL) && (nvlist_lookup_string(m_config,
354354
ZPOOL_CONFIG_PHYS_PATH, &path) == 0))

cddl/usr.sbin/zfsd/zfsd_exception.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ZfsdException::Log() const
106106

107107
output << "Pool ";
108108

109-
char *poolName;
109+
const char *poolName;
110110
if (nvlist_lookup_string(m_poolConfig, ZPOOL_CONFIG_POOL_NAME,
111111
&poolName) == 0)
112112
output << poolName;

lib/libbe/be.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ be_dependent_clone_cb(zfs_handle_t *zfs_hdl, void *data)
237237
{
238238
int err;
239239
bool found;
240-
char *name;
240+
const char *name;
241241
struct nvlist *nvl;
242242
struct nvpair *nvp;
243243
struct be_destroy_data *bdd;
@@ -1260,7 +1260,7 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, bool temporary)
12601260
{
12611261
char be_path[BE_MAXPATHLEN];
12621262
nvlist_t *dsprops;
1263-
char *origin;
1263+
const char *origin;
12641264
zfs_handle_t *zhp;
12651265
int err;
12661266

sbin/bectl/bectl.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ static int
362362
bectl_cmd_destroy(int argc, char *argv[])
363363
{
364364
nvlist_t *props;
365-
char *origin, *target, targetds[BE_MAXPATHLEN];
365+
char *target, targetds[BE_MAXPATHLEN];
366+
const char *origin;
366367
int err, flags, opt;
367368

368369
flags = 0;
@@ -584,13 +585,9 @@ main(int argc, char *argv[])
584585
}
585586

586587
if ((be = libbe_init(root)) == NULL) {
587-
if (!cmd->silent) {
588+
if (!cmd->silent)
588589
fprintf(stderr, "libbe_init(\"%s\") failed.\n",
589590
root != NULL ? root : "");
590-
if (root == NULL)
591-
fprintf(stderr,
592-
"Try specifying ZFS root using -r.\n");
593-
}
594591
return (-1);
595592
}
596593

0 commit comments

Comments
 (0)