mirror_zfs/lib
George Amanakis 80a650b7bb
Avoid panic with recordsize > 128k, raw sending and no large_blocks
The current codebase does not support raw sending buffers with block
size > 128kB when large_blocks is not active. This can happen in the
codepath dsl_dataset_sync()->dmu_objset_sync()->zio_nowait() which
calls back dmu_objset_write_done()->dsl_dataset_block_born(). If
dsl_dataset_sync() completes its run before dsl_dataset_block_born() is
called, we will end up not activating some of the necessary flags, while
having blocks based on those flags written in the filesystem. A
subsequent send will then panic.

Fix this by directly deciding in dmu_objset_sync() whether these flags
need to be activated later by dsl_dataset_sync(). Instead of panicking
due to a NULL pointer dereference in dmu_dump_write() in case of a send,
print out an error message. Also during scrub verify there are no
contradicting filesystem flags.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #12275
Closes #12438
2022-06-27 14:17:25 -07:00
..
libavl cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libefi autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
libicp Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
libnvpair Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
libshare linux: libshare: smb: don't swallow net(1) errors 2022-05-18 15:56:38 -07:00
libspl Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
libtpool autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
libunicode cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libuutil Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
libzfs Avoid panic with recordsize > 128k, raw sending and no large_blocks 2022-06-27 14:17:25 -07:00
libzfs_core Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
libzfsbootenv Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
libzpool Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
libzstd cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libzutil linux: libzutil: zfs_strip_path: only strip known prefixes 2022-05-16 15:56:57 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00