mirror_zfs/lib
Ryan Moeller e41013078a
libzfs: Fail making a dataset handle gracefully
When a dataset is in the process of being received it gets marked as
inconsistent and should not be used.  We should check for this when
opening a dataset handle in libzfs and return with an appropriate error
set, rather than hitting an abort because of the incomplete data.

zfs_open() passes errno to zfs_standard_error() after observing
make_dataset_handle() fail, which ends up aborting if errno is 0.
Set errno before returning where we know it has not been set already.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #13077
2022-02-18 13:09:03 -08:00
..
libavl lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
libefi libefi: remove efi_type() 2022-01-18 14:40:43 -08:00
libicp module: icp: rip out modhash. Replace the one user with AVL 2022-02-15 16:24:59 -08:00
libnvpair libnvpair: json: suppress wchar_t >=0 warnings 2022-02-18 09:34:43 -08:00
libshare userspace: mark arguments used 2022-02-18 09:34:08 -08:00
libspl userspace: mark arguments used 2022-02-18 09:34:08 -08:00
libtpool libtpool: -Wno-clobbered 2022-02-18 09:34:25 -08:00
libunicode cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libuutil Add --enable-asan and --enable-ubsan switches 2022-02-03 14:35:38 -08:00
libzfs libzfs: Fail making a dataset handle gracefully 2022-02-18 13:09:03 -08:00
libzfs_core Add --enable-asan and --enable-ubsan switches 2022-02-03 14:35:38 -08:00
libzfsbootenv Rename fallthrough to zfs_fallthrough 2022-02-15 08:58:59 -08:00
libzpool libzpool: kernel: silence unrelated-function-pointer cast warning 2022-02-18 09:34:47 -08:00
libzstd cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libzutil libtpool: -Wno-clobbered 2022-02-18 09:34:25 -08:00
Makefile.am Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00