zpool import/tryimport ioctl returns ENOMEM because provided buffer is too small for config
When calling zpool import, zpool does a few ioctls to ZFS.
zpool allocates a buffer in userland and passes it to the kernel so that ZFS can copy info into it. ZFS will use it to put the nvlist that describes the pool configuration.
If the allocated buffer is too small, ZFS will return ENOMEM and the call will have to be redone. This wastes CPU time and slows down the import process. This happens very often for the ZFS_IOC_POOL_TRYIMPORT call.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 8b65a70b763232c90a91f31eb2010314c02ed338 Author: Pavel Zakharov <firstname.lastname@example.org> Date: 2017-01-27T23:20:00.000Z 7541 zpool import/tryimport ioctl returns ENOMEM because provided buffer is too small for config Reviewed by: Matthew Ahrens <email@example.com> Reviewed by: Dan Kimmel <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>