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 almost 3 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 8b65a70b763232c90a91f31eb2010314c02ed338 Author: Pavel Zakharov <email@example.com> 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 <firstname.lastname@example.org> Reviewed by: Dan Kimmel <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>