Bug #7541
zpool import/tryimport ioctl returns ENOMEM because provided buffer is too small for config
Start date:
2016-11-07
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
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
git commit 8b65a70b763232c90a91f31eb2010314c02ed338
commit 8b65a70b763232c90a91f31eb2010314c02ed338 Author: Pavel Zakharov <pavel.zakharov@delphix.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 <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com>