zfs/lib
Ryan Moeller 1fdd768d7f 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-06-06 16:57:51 -07:00
..
libavl cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libefi cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libicp cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libnvpair Upgrade to libabigail 2.0.0 2021-11-05 07:59:40 -07:00
libshare freebsd/libshare: nfs: don't send SIGHUP to all processes 2022-02-03 15:28:01 -08:00
libspl FreeBSD: libspl: Add locking around statfs globals 2022-05-27 09:19:37 -07:00
libtpool cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libunicode cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libuutil Upgrade to libabigail 2.0.0 2021-11-05 07:59:40 -07:00
libzfs libzfs: Fail making a dataset handle gracefully 2022-06-06 16:57:51 -07:00
libzfs_core Upgrade to libabigail 2.0.0 2021-11-05 07:59:40 -07:00
libzfsbootenv Upgrade to libabigail 2.0.0 2021-11-05 07:59:40 -07:00
libzpool file reference counts can get corrupted 2021-09-14 12:37:38 -07:00
libzstd cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libzutil libzutil: zpool_find_config: remove unused variable 2022-05-02 15:42:58 -07:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00