Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/lib/libzfs/common When collecting z...
details: https://anonhg.NetBSD.org/src/rev/ba974d3b4f24
branches: trunk
changeset: 970799:ba974d3b4f24
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Apr 04 13:45:22 2020 +0000
description:
When collecting zpool devices, skip disks with wedges so that a
concurrent test of a wedge on that disk doesn't fail.
diffstat:
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r ed7fcdb7db96 -r ba974d3b4f24 external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c
--- a/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Sat Apr 04 13:44:57 2020 +0000
+++ b/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Sat Apr 04 13:45:22 2020 +0000
@@ -1095,8 +1095,16 @@
}
#endif /* __FreeBSD__ */
#ifdef __NetBSD__
+ struct dkwedge_list dkwl;
off_t size;
+ /* skip devices with wedges */
+ if (native_ioctl(fd, DIOCLWEDGES, &dkwl) == 0 &&
+ dkwl.dkwl_nwedges > 0) {
+ (void) close(fd);
+ return;
+ }
+
if (native_ioctl(fd, DIOCGMEDIASIZE, &size) < 0 ||
size < SPA_MINDEVSIZE) {
(void) close(fd);
Home |
Main Index |
Thread Index |
Old Index