freebsd-src/lib/libzfs
Brian Behlendorf a1771d243a
Fix "out of memory" error
Drop the no_memory() call from zpool_in_use() when reading the
label fails and instead return the error to the caller.  This
prevents a misleading "internal error: out of memory" error
when the label can't be read.  This will result in is_spare()
returning B_FALSE instead of aborting, which is already safely
handled.

Furthermore, on Linux it's possible for EREMOTEIO to returned
by an NVMe device if the device has been low-level formatted
and not rescanned.  In this case we want to fallback to the
legacy scanning method and read any of the labels we can.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #13538
Closes #15747
2024-01-12 12:35:29 -08:00
..
os Only provide execvpe(3) when needed 2023-11-30 16:04:18 -08:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs.abi zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08: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
libzfs_changelist.c Add '-u' - nomount flag for zfs set 2023-10-02 16:58:54 -07:00
libzfs_config.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libzfs_crypto.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_dataset.c Add '-u' - nomount flag for zfs set 2023-10-02 16:58:54 -07:00
libzfs_diff.c Add more ANSI colors to libzfs 2023-03-24 10:21:19 -07:00
libzfs_impl.h nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_import.c Fix "out of memory" error 2024-01-12 12:35:29 -08:00
libzfs_iter.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_mount.c Relax error reporting in zpool import and zpool split 2023-09-01 17:25:11 -07:00
libzfs_pool.c zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08:00
libzfs_sendrecv.c libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 2023-08-08 09:35:35 -07:00
libzfs_status.c nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_util.c RAID-Z expansion feature 2023-11-08 10:19:41 -08:00
Makefile.am libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 2023-08-08 09:35:35 -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