CVS commit: src/external/cddl/osnet/dist/lib/libzfs/common
"YAMAMOTO Takashi" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: src
Committed By: yamt
Date: Fri Mar 20 12:26:37 UTC 2026
Modified Files:
src/external/cddl/osnet/dist/lib/libzfs/common: libzfs_import.c
Log Message:
zpool_find_import_impl: fix block/character device confusion
this commit fixes zpool import failure in some cases.
the current logic sometimes (eg. "zpool import -d" with a directory
which is not "/dev") ends up with picking character devices
and pass them to ZFS_IOC_POOL_TRYIMPORT/ZFS_IOC_POOL_IMPORT ioctl.
such attempts would fail, marking the corrosponding vdevs UNAVAIL.
this commit fixes it by skipping character devices.
also, this commit makes the label checking logic prefer to use
character devices when available because it seems like the intention
of the upstream logic.
also, this commit fixes import of file-backed vdevs.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.