mirror_zfs/lib/libzfs
George Melikov 28b40c8a6e OpenZFS 7541 - zpool import/tryimport ioctl returns ENOMEM
Authored by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>

The refresh_config() calls into the kernel with ZFS_IOC_POOL_TRYIMPORT.
This ioctl returns the config of the pool in a buffer pre-allocated in
userland. The original estimate for the size is too conservative since
it doesn't account for the large size of vdev stats that are added to
the config before returning.
This fix simply increases the size of the buffer passed. This results in
a speed up of the zpool import process, and less spam in zfs_dbgmsg.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/7541
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/a3c7690
Closes #5704
2017-01-30 13:20:54 -08:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Fix coverity defects: CID 147654, 147690 2016-10-13 14:02:07 -07:00
libzfs_config.c Fix indefinite article 2016-08-11 11:23:49 -07:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_dataset.c OpenZFS 7386 - zfs get does not work properly with bookmarks 2017-01-26 14:42:15 -08:00
libzfs_diff.c Fix coverity defects: CID 147475 2016-12-09 11:59:36 -07:00
libzfs_fru.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
libzfs_import.c OpenZFS 7541 - zpool import/tryimport ioctl returns ENOMEM 2017-01-30 13:20:54 -08:00
libzfs_iter.c OpenZFS 6328 - Fix cstyle errors in zfs codebase 2017-01-12 09:42:11 -08:00
libzfs_mount.c OpenZFS 7336 - vfork and O_CLOEXEC causes zfs_mount EBUSY 2017-01-26 12:28:29 -08:00
libzfs_pool.c Add realloc() success check in zpool_history_unpack() 2017-01-27 11:10:10 -08:00
libzfs_sendrecv.c OpenZFS 7340 - receive manual origin should override automatic origin 2017-01-27 11:47:54 -08:00
libzfs_status.c Read spl_hostid module parameter before gethostid() 2015-02-04 16:44:53 -08:00
libzfs_util.c OpenZFS 7386 - zfs get does not work properly with bookmarks 2017-01-26 14:42:15 -08:00
libzfs.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Add -c to zpool iostat & status to run command 2016-11-29 14:45:38 -07:00