mirror_zfs/lib/libzfs
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
..
os libzfs: zfs_userns: Don't leak the namespace fd 2022-06-14 08:13:38 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c Replace libzfs sharing _nfs() and _smb() APIs with protocol lists 2022-05-12 09:26:42 -07:00
libzfs_config.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_crypto.c libzfs: Define the defecto standard errbuf size 2022-06-09 15:24:24 -07:00
libzfs_dataset.c Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property 2022-06-14 11:27:53 -07:00
libzfs_diff.c libzfs: Define the defecto standard errbuf size 2022-06-09 15:24:24 -07:00
libzfs_impl.h libzfs: Define the defecto standard errbuf size 2022-06-09 15:24:24 -07:00
libzfs_import.c libzfs: import: zpool_clear_label: bool for boolean status 2022-04-13 11:37:18 -07:00
libzfs_iter.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_mount.c libzfs: zfs_unshare: minor cleanup 2022-05-12 09:27:04 -07:00
libzfs_pool.c Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property 2022-06-14 11:27:53 -07:00
libzfs_sendrecv.c Avoid panic with recordsize > 128k, raw sending and no large_blocks 2022-06-27 14:17:25 -07:00
libzfs_status.c libzfs: Convert to fnvpair functions 2022-03-14 15:44:56 -07:00
libzfs_util.c Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property 2022-06-14 11:27:53 -07:00
libzfs.abi Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00