FreeBSD Bugzilla – Attachment 208127 Details for
Bug 241083
zfs: zpool import seems to probe all snapshots
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Speed up "zpool import" in the presence of many zvols
241083.patch (text/plain), 1.12 KB, created by
Alan Somers
on 2019-10-05 22:47:10 UTC
(
hide
)
Description:
Speed up "zpool import" in the presence of many zvols
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2019-10-05 22:47:10 UTC
Size:
1.12 KB
patch
obsolete
>Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c >=================================================================== >--- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c (revision 353007) >+++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c (working copy) >@@ -1244,6 +1244,9 @@ > avl_tree_t slice_cache; > rdsk_node_t *slice; > void *cookie; >+ bool zvol_recursive = true; >+ int value; >+ size_t size = sizeof(value); > > if (dirs == 0) { > dirs = 1; >@@ -1250,6 +1253,11 @@ > dir = &default_dir; > } > >+ if (0 == sysctlbyname("vfs.zfs.vol.recursive", &value, &size, NULL, 0)) >+ { >+ zvol_recursive = (value != 0); >+ } >+ > /* > * Go through and read the label configuration information from every > * possible device, organizing the information according to pool GUID >@@ -1314,6 +1322,10 @@ > } > > LIST_FOREACH(mp, &mesh.lg_class, lg_class) { >+ if (!zvol_recursive && >+ strcmp(mp->lg_name, "ZFS::ZVOL") == 0) { >+ continue; >+ } > LIST_FOREACH(gp, &mp->lg_geom, lg_geom) { > LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { > slice = zfs_alloc(hdl, sizeof (rdsk_node_t));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241083
:
208125
|
208126
| 208127