mirror_zfs/lib
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
..
libavl cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libefi Fix multiplication converted to larger type 2022-10-28 09:30:37 -07:00
libicp Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
libnvpair nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libshare freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
libspl dmu: Allow buffer fills to fail 2023-12-15 09:51:41 -08:00
libtpool Add <limits.h> header 2022-11-28 13:24:17 -08:00
libunicode cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libuutil ABI files: sync with new Ubuntu release in CI 2023-03-10 16:23:01 -08:00
libzfs Fix "out of memory" error 2024-01-12 12:35:29 -08:00
libzfs_core RAID-Z expansion feature 2023-11-08 10:19:41 -08:00
libzfsbootenv nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzpool RAID-Z expansion feature 2023-11-08 10:19:41 -08:00
libzstd cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libzutil Fix "out of memory" error 2024-01-12 12:35:29 -08:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00