HomeFreeBSD

Fix Large kmem_alloc in vdev_metaslab_init

Description

Fix Large kmem_alloc in vdev_metaslab_init

This allocation can go way over 1MB, so we should use vmem_alloc
instead of kmem_alloc.

Large kmem_alloc(1430784, 0x1000), please file an issue...
Call Trace:
 [<ffffffffa0324aff>] ? spl_kmem_zalloc+0xef/0x160 [spl]
 [<ffffffffa17d0c8d>] ? vdev_metaslab_init+0x9d/0x1f0 [zfs]
 [<ffffffffa17d46d0>] ? vdev_load+0xc0/0xd0 [zfs]
 [<ffffffffa17d4643>] ? vdev_load+0x33/0xd0 [zfs]
 [<ffffffffa17c0004>] ? spa_load+0xfc4/0x1b60 [zfs]
 [<ffffffffa17c1838>] ? spa_tryimport+0x98/0x430 [zfs]
 [<ffffffffa17f28b1>] ? zfs_ioc_pool_tryimport+0x41/0x80 [zfs]
 [<ffffffffa17f5669>] ? zfsdev_ioctl+0x4a9/0x4e0 [zfs]
 [<ffffffff811bacdf>] ? do_vfs_ioctl+0x2cf/0x4b0
 [<ffffffff811baf41>] ? SyS_ioctl+0x81/0xa0

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4752

Details

Provenance
Chunwei Chen <david.chen@osnexus.com>Authored on Jul 7 2016, 12:06 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 12 2016, 8:34 PM
Parents
rG7938c2aca741: Don't allow accessing XATTR via export handle
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGbffb68a2b863: Fix Large kmem_alloc in vdev_metaslab_init (authored by Chunwei Chen <david.chen@osnexus.com>).Jul 12 2016, 8:34 PM