diff options
author | George Melikov <[email protected]> | 2017-01-31 00:20:55 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-01-30 13:20:54 -0800 |
commit | 28b40c8a6e31308531de0ab128887e65c28d891c (patch) | |
tree | 2bc40c06b275d07b41742f76d440911d6efb8248 /include | |
parent | 456079d48dcc3e1394d1f519a17abae2177c5ffa (diff) |
OpenZFS 7541 - zpool import/tryimport ioctl returns ENOMEM
Authored by: Pavel Zakharov <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Dan Kimmel <[email protected]>
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 <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7541
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/a3c7690
Closes #5704
Diffstat (limited to 'include')
-rw-r--r-- | include/libzfs_impl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h index 36441ed7b..75a7bc249 100644 --- a/include/libzfs_impl.h +++ b/include/libzfs_impl.h @@ -131,6 +131,8 @@ typedef enum { SHARED_SMB = 0x4 } zfs_share_type_t; +#define CONFIG_BUF_MINSIZE 65536 + int zfs_error(libzfs_handle_t *, int, const char *); int zfs_error_fmt(libzfs_handle_t *, int, const char *, ...); void zfs_error_aux(libzfs_handle_t *, const char *, ...); |