Project

General

Profile

Bug #7541

zpool import/tryimport ioctl returns ENOMEM because provided buffer is too small for config

Added by Prakash Surya almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2016-11-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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.

History

#1

Updated by Electric Monk over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

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>

Also available in: Atom PDF