Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs-2.2.5 patchset #16359

Merged
merged 48 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9edf6af
Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN.
chenqiuhao1997 May 10, 2024
b474dfa
Refactor dbuf_read() for safer decryption
amotin Apr 22, 2024
0f1e8ba
L2ARC: Cleanup buffer re-compression
amotin Apr 23, 2024
938d158
Make more taskq parameters writable
amotin Apr 24, 2024
6724746
Slightly improve dnode hash
amotin May 1, 2024
41f2a9c
Fix scn_queue races on very old pools
amotin May 9, 2024
4c484d6
Fix ZIL clone records for legacy holes
amotin May 9, 2024
fa4b1a4
ZAP: Fix leaf references on zap_expand_leaf() errors
amotin May 10, 2024
4c0fbd8
FreeBSD: Add zfs_link_create() error handling
amotin May 17, 2024
2eab4f7
Fix assertion in Persistent L2ARC
gamanakis May 25, 2024
54ef0fd
head_errlog: fix use-after-free
gamanakis Jul 15, 2024
f4e2aed
Linux 6.7 compat: detect if kernel defines intptr_t
robn May 25, 2024
c24a039
Linux 6.9: Call add_disk() from workqueue to fix zfs_allow_010_pos (#…
tonyhutter Jun 28, 2024
d7bf0e5
Linux 6.9: Fix UBSAN errors in zap_micro.c
tonyhutter Jul 11, 2024
0342c4a
Linux 6.10: rework queue limits setup
robn May 28, 2024
3ea3649
Linux 6.10: work harder to avoid kmem_cache_alloc reuse
robn May 28, 2024
7d8e2a7
Linux 5.16: use bdev_nr_bytes() to get device capacity
robn May 28, 2024
97f1eb8
ZTS: Fix redacted_send failures on FreeBSD
tonyhutter May 31, 2024
da9da6a
ZTS: handle FreeBSD version numbers correctly (#16340)
robn Jul 12, 2024
bb401c0
Linux 6.9 compat: META (#16358)
tonyhutter Jul 16, 2024
08da054
one-word manpage correction: snapshot->rollback (#16294)
a1ea321 Jul 12, 2024
dfdac38
Fix missing semicolon in trace_dbuf.h (#16281)
dberlin Jul 13, 2024
f14a62e
zts: allow running a single test by name only
robn Apr 15, 2024
ad8c8c1
zts: add a debug option to get full test output
robn Apr 16, 2024
fa2480f
abd_iter_page: rework to handle multipage scatterlists
robn Apr 19, 2024
32cd2da
find_system_library: fix var cleanup when library not found
robn Apr 30, 2024
5668411
Only provide execvpe(3) when needed
brooksdavis Dec 1, 2023
96cad4c
libspl/assert: show process/task details in assert output
robn Apr 21, 2024
3ca305f
libspl/assert: add lock around assertion output
robn Apr 28, 2024
21f66db
libspl/assert: dump backtrace in assert
robn Apr 27, 2024
8868621
libspl/assert: use libunwind for backtrace when available
robn Apr 30, 2024
bc42d96
Unbreak FreeBSD cross-build on MacOS broken in 051460b8b
mmatuska May 9, 2024
2a2e358
libspl_assert: always link -lpthread on FreeBSD
robn May 9, 2024
d06c8de
zdb: bring crash handling over from ztest
robn May 9, 2024
27cc6df
Use memset to zero stack allocations containing unions
robn May 25, 2024
ba3c769
Destroy ARC buffer in case of fill error
amotin May 25, 2024
13ccbbb
Some improvements to metaslabs eviction
amotin May 29, 2024
c950c5d
disable automatic dependency tracking for dkms builds
SoongNoonien Jun 14, 2024
25c4271
zts: test single-disk pool resumes properly after disk pull
robn May 9, 2024
4d2f7f9
vdev_open: clear async fault flag after reopen
robn Jun 11, 2024
9835255
zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly (#16334)
robn Jul 17, 2024
14cce09
FreeBSD: Use a statement expression to implement SET_ERROR() (#16284)
markjdb Jul 9, 2024
9ad205e
AUTHORS: refresh with recent new contributors (#16362)
robn Jul 23, 2024
ef08cb2
Fix long_free_dirty accounting for small files (#16264)
tuxoko Jul 23, 2024
b5835ed
Linux 6.9: Fix UBSAN errors in sa.c (#16380)
tonyhutter Jul 24, 2024
dd5de55
ZTS: Make do_vol_test() more deterministic (#16379)
amotin Jul 24, 2024
6f27c4c
[2.2.5-only] Make 'rmmod zfs' work after zfs-2.2.4 (#16406)
tonyhutter Aug 3, 2024
33174af
Tag zfs-2.2.5
tonyhutter Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ Yanping Gao <[email protected]>
Youzhong Yang <[email protected]>

# Signed-off-by: overriding Author:
Ryan <[email protected]> <[email protected]>
Qiuhao Chen <[email protected]> <[email protected]>
Yuxin Wang <[email protected]> <[email protected]>
Zhenlei Huang <[email protected]> <[email protected]>

# Commits from strange places, long ago
Brian Behlendorf <[email protected]> <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Expand All @@ -95,13 +98,15 @@ Alek Pinchuk <[email protected]> <[email protected]>
Alexander Lobakin <[email protected]> <[email protected]>
Alexey Smirnoff <[email protected]> <[email protected]>
Allen Holl <[email protected]> <[email protected]>
Alphan Yılmaz <[email protected]> <[email protected]>
Ameer Hamza <[email protected]> <[email protected]>
Andrew J. Hesford <[email protected]> <[email protected]>>
Andrew Sun <[email protected]> <[email protected]>
Aron Xu <[email protected]> <[email protected]>
Arun KV <[email protected]> <[email protected]>
Ben Wolsieffer <[email protected]> <[email protected]>
bernie1995 <[email protected]> <[email protected]>
Bojan Novković <[email protected]> <[email protected]>
Boris Protopopov <[email protected]> <[email protected]>
Brad Forschinger <[email protected]> <[email protected]>
Brandon Thetford <[email protected]> <[email protected]>
Expand Down Expand Up @@ -193,6 +198,7 @@ Stefan Lendl <[email protected]> <[email protected]>
Thomas Bertschinger <[email protected]> <[email protected]>
Thomas Geppert <[email protected]> <[email protected]>
Tim Crawford <[email protected]> <[email protected]>
Todd Seidelmann <[email protected]>
Tom Matthews <[email protected]> <[email protected]>
Tony Perkins <[email protected]> <[email protected]>
Torsten Wörtwein <[email protected]> <[email protected]>
Expand Down
13 changes: 13 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CONTRIBUTORS:
Alex Zhuravlev <[email protected]>
Allan Jude <[email protected]>
Allen Holl <[email protected]>
Alphan Yılmaz <[email protected]>
alteriks <[email protected]>
Alyssa Ross <[email protected]>
Ameer Hamza <[email protected]>
Expand Down Expand Up @@ -99,6 +100,7 @@ CONTRIBUTORS:
bernie1995 <[email protected]>
Bill McGonigle <[email protected]>
Bill Pijewski <[email protected]>
Bojan Novković <[email protected]>
Boris Protopopov <[email protected]>
Brad Forschinger <[email protected]>
Brad Lewis <[email protected]>
Expand Down Expand Up @@ -168,6 +170,7 @@ CONTRIBUTORS:
Daniel Hoffman <[email protected]>
Daniel Kobras <[email protected]>
Daniel Kolesa <[email protected]>
Daniel Perry <[email protected]>
Daniel Reichelt <[email protected]>
Daniel Stevenson <[email protected]>
Daniel Verite <[email protected]>
Expand All @@ -187,6 +190,7 @@ CONTRIBUTORS:
Dennis R. Friedrichsen <[email protected]>
Denys Rtveliashvili <[email protected]>
Derek Dai <[email protected]>
Derek Schrock <[email protected]>
Dex Wood <[email protected]>
DHE <[email protected]>
Didier Roche <[email protected]>
Expand Down Expand Up @@ -245,6 +249,7 @@ CONTRIBUTORS:
Gionatan Danti <[email protected]>
Giuseppe Di Natale <[email protected]>
Glenn Washburn <[email protected]>
glibg10b <[email protected]>
gofaster <[email protected]>
Gordan Bobic <[email protected]>
Gordon Bergling <[email protected]>
Expand Down Expand Up @@ -410,6 +415,7 @@ CONTRIBUTORS:
Mart Frauenlob <[email protected]>
Martin Matuska <[email protected]>
Martin Rüegg <[email protected]>
Martin Wagner <[email protected]>
Massimo Maggi <[email protected]>
Mateusz Guzik <[email protected]>
Mateusz Piotrowski <[email protected]>
Expand Down Expand Up @@ -488,6 +494,7 @@ CONTRIBUTORS:
Peng <[email protected]>
Peter Ashford <[email protected]>
Peter Dave Hello <[email protected]>
Peter Doherty <[email protected]>
Peter Levine <[email protected]>
Peter Wirdemo <[email protected]>
Petros Koutoupis <[email protected]>
Expand All @@ -501,6 +508,7 @@ CONTRIBUTORS:
Prasad Joshi <[email protected]>
privb0x23 <[email protected]>
P.SCH <[email protected]>
Qiuhao Chen <[email protected]>
Quartz <[email protected]>
Quentin Zdanis <[email protected]>
Rafael Kitover <[email protected]>
Expand Down Expand Up @@ -532,6 +540,7 @@ CONTRIBUTORS:
Roman Strashkin <[email protected]>
Ross Williams <[email protected]>
Ruben Kerkhof <[email protected]>
Ryan <[email protected]>
Ryan Hirasaki <[email protected]>
Ryan Lahfa <[email protected]>
Ryan Libby <[email protected]>
Expand All @@ -556,6 +565,7 @@ CONTRIBUTORS:
Sen Haerens <[email protected]>
Serapheim Dimitropoulos <[email protected]>
Seth Forshee <[email protected]>
Seth Troisi <[email protected]>
Shaan Nobee <[email protected]>
Shampavman <[email protected]>
Shaun Tancheff <[email protected]>
Expand Down Expand Up @@ -602,6 +612,7 @@ CONTRIBUTORS:
Tim Schumacher <[email protected]>
Tino Reichardt <[email protected]>
Tobin Harding <[email protected]>
Todd Seidelmann <[email protected]>
Tom Caputi <[email protected]>
Tom Matthews <[email protected]>
Tomohiro Kusumi <[email protected]>
Expand Down Expand Up @@ -653,6 +664,8 @@ CONTRIBUTORS:
Zachary Bedell <[email protected]>
Zach Dykstra <[email protected]>
zgock <[email protected]>
Zhao Yongming <[email protected]>
Zhenlei Huang <[email protected]>
Zhu Chuang <[email protected]>
Érico Nogueira <[email protected]>
Đoàn Trần Công Danh <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions META
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Meta: 1
Name: zfs
Branch: 1.0
Version: 2.2.4
Version: 2.2.5
Release: 1
Release-Tags: relext
License: CDDL
Author: OpenZFS
Linux-Maximum: 6.8
Linux-Maximum: 6.9
Linux-Minimum: 3.10
93 changes: 83 additions & 10 deletions cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <sys/spa_impl.h>
#include <sys/dmu.h>
#include <sys/zap.h>
#include <sys/zap_impl.h>
#include <sys/fs/zfs.h>
#include <sys/zfs_znode.h>
#include <sys/zfs_sa.h>
Expand Down Expand Up @@ -84,6 +85,9 @@
#include <sys/brt_impl.h>
#include <zfs_comutil.h>
#include <sys/zstd/zstd.h>
#if (__GLIBC__ && !__UCLIBC__)
#include <execinfo.h> /* for backtrace() */
#endif

#include <libnvpair.h>
#include <libzutil.h>
Expand Down Expand Up @@ -926,11 +930,41 @@ usage(void)
static void
dump_debug_buffer(void)
{
if (dump_opt['G']) {
(void) printf("\n");
(void) fflush(stdout);
zfs_dbgmsg_print("zdb");
}
ssize_t ret __attribute__((unused));

if (!dump_opt['G'])
return;
/*
* We use write() instead of printf() so that this function
* is safe to call from a signal handler.
*/
ret = write(STDOUT_FILENO, "\n", 1);
zfs_dbgmsg_print("zdb");
}

#define BACKTRACE_SZ 100

static void sig_handler(int signo)
{
struct sigaction action;
#if (__GLIBC__ && !__UCLIBC__) /* backtrace() is a GNU extension */
int nptrs;
void *buffer[BACKTRACE_SZ];

nptrs = backtrace(buffer, BACKTRACE_SZ);
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
#endif
dump_debug_buffer();

/*
* Restore default action and re-raise signal so SIGSEGV and
* SIGABRT can trigger a core dump.
*/
action.sa_handler = SIG_DFL;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
(void) sigaction(signo, &action, NULL);
raise(signo);
}

/*
Expand Down Expand Up @@ -1199,16 +1233,33 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
for (zap_cursor_init(&zc, os, object);
zap_cursor_retrieve(&zc, &attr) == 0;
zap_cursor_advance(&zc)) {
(void) printf("\t\t%s = ", attr.za_name);
boolean_t key64 =
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);

if (key64)
(void) printf("\t\t0x%010lx = ",
*(uint64_t *)attr.za_name);
else
(void) printf("\t\t%s = ", attr.za_name);

if (attr.za_num_integers == 0) {
(void) printf("\n");
continue;
}
prop = umem_zalloc(attr.za_num_integers *
attr.za_integer_length, UMEM_NOFAIL);
(void) zap_lookup(os, object, attr.za_name,
attr.za_integer_length, attr.za_num_integers, prop);
if (attr.za_integer_length == 1) {

if (key64)
(void) zap_lookup_uint64(os, object,
(const uint64_t *)attr.za_name, 1,
attr.za_integer_length, attr.za_num_integers,
prop);
else
(void) zap_lookup(os, object, attr.za_name,
attr.za_integer_length, attr.za_num_integers,
prop);

if (attr.za_integer_length == 1 && !key64) {
if (strcmp(attr.za_name,
DSL_CRYPTO_KEY_MASTER_KEY) == 0 ||
strcmp(attr.za_name,
Expand All @@ -1227,6 +1278,10 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
} else {
for (i = 0; i < attr.za_num_integers; i++) {
switch (attr.za_integer_length) {
case 1:
(void) printf("%u ",
((uint8_t *)prop)[i]);
break;
case 2:
(void) printf("%u ",
((uint16_t *)prop)[i]);
Expand Down Expand Up @@ -5217,7 +5272,7 @@ dump_label(const char *dev)
sizeof (cksum_record_t), offsetof(cksum_record_t, link));

psize = statbuf.st_size;
psize = P2ALIGN(psize, (uint64_t)sizeof (vdev_label_t));
psize = P2ALIGN_TYPED(psize, sizeof (vdev_label_t), uint64_t);
ashift = SPA_MINBLOCKSHIFT;

/*
Expand Down Expand Up @@ -8934,9 +8989,27 @@ main(int argc, char **argv)
char *spa_config_path_env, *objset_str;
boolean_t target_is_spa = B_TRUE, dataset_lookup = B_FALSE;
nvlist_t *cfg = NULL;
struct sigaction action;

dprintf_setup(&argc, argv);

/*
* Set up signal handlers, so if we crash due to bad on-disk data we
* can get more info. Unlike ztest, we don't bail out if we can't set
* up signal handlers, because zdb is very useful without them.
*/
action.sa_handler = sig_handler;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
if (sigaction(SIGSEGV, &action, NULL) < 0) {
(void) fprintf(stderr, "zdb: cannot catch SIGSEGV: %s\n",
strerror(errno));
}
if (sigaction(SIGABRT, &action, NULL) < 0) {
(void) fprintf(stderr, "zdb: cannot catch SIGABRT: %s\n",
strerror(errno));
}

/*
* If there is an environment variable SPA_CONFIG_PATH it overrides
* default spa_config_path setting. If -U flag is specified it will
Expand Down
4 changes: 3 additions & 1 deletion cmd/zstream/zstream_redup.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,16 @@ static void
zfs_redup_stream(int infd, int outfd, boolean_t verbose)
{
int bufsz = SPA_MAXBLOCKSIZE;
dmu_replay_record_t thedrr = { 0 };
dmu_replay_record_t thedrr;
dmu_replay_record_t *drr = &thedrr;
redup_table_t rdt;
zio_cksum_t stream_cksum;
uint64_t numbuckets;
uint64_t num_records = 0;
uint64_t num_write_byref_records = 0;

memset(&thedrr, 0, sizeof (dmu_replay_record_t));

#ifdef _ILP32
uint64_t max_rde_size = SMALLEST_POSSIBLE_MAX_RDT_MB << 20;
#else
Expand Down
12 changes: 7 additions & 5 deletions cmd/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
ASSERT3P(zio, !=, NULL);
size = doi.doi_data_block_size;
if (ISP2(size)) {
offset = P2ALIGN(offset, size);
offset = P2ALIGN_TYPED(offset, size, uint64_t);
} else {
ASSERT3U(offset, <, size);
offset = 0;
Expand Down Expand Up @@ -4668,7 +4668,8 @@ ztest_dmu_object_next_chunk(ztest_ds_t *zd, uint64_t id)
*/
mutex_enter(&os->os_obj_lock);
object = ztest_random(os->os_obj_next_chunk);
os->os_obj_next_chunk = P2ALIGN(object, dnodes_per_chunk);
os->os_obj_next_chunk = P2ALIGN_TYPED(object, dnodes_per_chunk,
uint64_t);
mutex_exit(&os->os_obj_lock);
}

Expand Down Expand Up @@ -6284,7 +6285,8 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
* the end of the disk (vdev_psize) is aligned to
* sizeof (vdev_label_t).
*/
uint64_t psize = P2ALIGN(fsize, sizeof (vdev_label_t));
uint64_t psize = P2ALIGN_TYPED(fsize, sizeof (vdev_label_t),
uint64_t);
if ((leaf & 1) == 1 &&
offset + sizeof (bad) > psize - VDEV_LABEL_END_SIZE)
continue;
Expand Down Expand Up @@ -6600,8 +6602,8 @@ ztest_fletcher_incr(ztest_ds_t *zd, uint64_t id)
size_t inc = 64 * ztest_random(size / 67);
/* sometimes add few bytes to test non-simd */
if (ztest_random(100) < 10)
inc += P2ALIGN(ztest_random(64),
sizeof (uint32_t));
inc += P2ALIGN_TYPED(ztest_random(64),
sizeof (uint32_t), uint64_t);

if (inc > (size - pos))
inc = size - pos;
Expand Down
4 changes: 2 additions & 2 deletions config/find_system_library.m4
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ AC_DEFUN([ZFS_AC_FIND_SYSTEM_LIBRARY], [
AC_DEFINE([HAVE_][$1], [1], [Define if you have [$5]])
$7
],[dnl ELSE
AC_SUBST([$1]_CFLAGS, [])
AC_SUBST([$1]_LIBS, [])
AC_SUBST([$1]_CFLAGS, [""])
AC_SUBST([$1]_LIBS, [""])
AC_MSG_WARN([cannot find [$5] via pkg-config or in the standard locations])
$8
])
Expand Down
4 changes: 2 additions & 2 deletions config/kernel-blk-queue.m4
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS], [
ZFS_LINUX_TEST_RESULT([blk_queue_max_hw_sectors], [
AC_MSG_RESULT(yes)
],[
ZFS_LINUX_TEST_ERROR([blk_queue_max_hw_sectors])
AC_MSG_RESULT(no)
])
])

Expand All @@ -355,7 +355,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS], [
ZFS_LINUX_TEST_RESULT([blk_queue_max_segments], [
AC_MSG_RESULT(yes)
], [
ZFS_LINUX_TEST_ERROR([blk_queue_max_segments])
AC_MSG_RESULT(no)
])
])

Expand Down
Loading
Loading