zfs/lib/libzfs
Alan Somers 2d8f72d76c
zpool: speed up importing large pools (#11469)
The ZFS_IOC_POOL_TRYIMPORT ioctl returns an nvlist from the kernel to a
preallocated buffer in  userland.  Userland must guess how large the
buffer should be.  If it undersizes it, it must reallocate and try
again.  That can cost a lot of time for large pools.

OpenZFS commit 28b40c8a6e set the guess at "zc.zc_nvlist_conf_size * 4"
without explanation.  On my system, that is too small.  From experiment,
x 32 is a better multiplier.  But I don't know how to calculate it
theoretically.

Sponsored by:	Axcient
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk@axcient.com>
Signed-off-by:	Alan Somers <asomers@gmail.com>
Closes #11469
2021-01-21 12:55:54 -08:00
..
os FreeBSD libzfs: gcc requires __thread after static 2020-12-14 09:28:24 -08:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
Makefile.am Linux 5.10 compat: use iov_iter in uio structure 2020-12-18 08:48:26 -08:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.abi Add ABI snapshot 2020-11-17 09:21:39 -08:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
libzfs_changelist.c Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c Fix typos 2020-06-09 21:24:09 -07:00
libzfs_dataset.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
libzfs_diff.c Don't open zfs control device exclusively 2020-02-28 14:54:14 -08:00
libzfs_import.c zpool: speed up importing large pools (#11469) 2021-01-21 12:55:54 -08:00
libzfs_iter.c Mark functions as static 2020-06-18 12:20:38 -07:00
libzfs_mount.c Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libzfs_pool.c zpool: Dryrun fails to list some devices 2020-12-04 14:04:39 -08:00
libzfs_sendrecv.c libzfs_sendrecv: Use fnv* to verify nvlist/nvpair* 2021-01-14 09:53:09 -08:00
libzfs_status.c Import vdev ashift optimization from FreeBSD 2020-08-21 12:53:17 -07:00
libzfs_util.c Update references to nonexistent man pages in code 2020-10-30 08:55:59 -07:00