]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r357235:
authorAlan Somers <asomers@FreeBSD.org>
Thu, 13 Feb 2020 20:49:45 +0000 (20:49 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Thu, 13 Feb 2020 20:49:45 +0000 (20:49 +0000)
commitbffb46360d865323c1d071d5e29b3bee57c18298
treeddadbc270e7b7f32e9584c77d42ec2e9eba3903d
parent973d3e6779c48c8d21c1f49439c95f0035b4407e
MFC r357235:

Speed up "zpool import" in the presence of many zvols

By default, zpools may not be backed by zvols (that can be changed with the
"vfs.zfs.vol.recursive" sysctl). When that sysctl is set to 0, the kernel
does not attempt to read zvols when looking for vdevs. But the zpool command
still does. This change brings the zpool command into line with the kernel's
behavior. It speeds "zpool import" when an already imported pool has many
zvols, or a zvol with many snapshots.

PR: 241083
Reported by: Martin Birgmeier <d8zNeCFG@aon.at>
Reviewed by: mav, Ryan Moeller <ryan@freqlabs.com>
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D22077
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c