summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorNick Mattis <[email protected]>2019-07-10 18:54:49 -0400
committerBrian Behlendorf <[email protected]>2019-07-10 15:54:49 -0700
commitd230a65c3b161d33de3a8f96e78f8a35edce6708 (patch)
treea9e6f69cc5bf7e35da0edcb160f6062f14bdfc8a /module
parentc3fba9091b1792755a0aac804f6ada1fe863c8b6 (diff)
Fixes: #8934 Large kmem_alloc
Large allocation over the spl_kmem_alloc_warn value was being performed. Switched to vmem_alloc interface as specified for large allocations. Changed the subsequent frees to match. Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: nmattis <[email protected]> Closes #8934 Closes #9011
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_indirect_births.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/vdev_indirect_births.c b/module/zfs/vdev_indirect_births.c
index 1c44a6428..99b83c392 100644
--- a/module/zfs/vdev_indirect_births.c
+++ b/module/zfs/vdev_indirect_births.c
@@ -70,7 +70,7 @@ vdev_indirect_births_close(vdev_indirect_births_t *vib)
if (vib->vib_phys->vib_count > 0) {
uint64_t births_size = vdev_indirect_births_size_impl(vib);
- kmem_free(vib->vib_entries, births_size);
+ vmem_free(vib->vib_entries, births_size);
vib->vib_entries = NULL;
}
@@ -108,7 +108,7 @@ vdev_indirect_births_open(objset_t *os, uint64_t births_object)
if (vib->vib_phys->vib_count > 0) {
uint64_t births_size = vdev_indirect_births_size_impl(vib);
- vib->vib_entries = kmem_alloc(births_size, KM_SLEEP);
+ vib->vib_entries = vmem_alloc(births_size, KM_SLEEP);
VERIFY0(dmu_read(vib->vib_objset, vib->vib_object, 0,
births_size, vib->vib_entries, DMU_READ_PREFETCH));
}
@@ -148,10 +148,10 @@ vdev_indirect_births_add_entry(vdev_indirect_births_t *vib,
vib->vib_phys->vib_count++;
new_size = vdev_indirect_births_size_impl(vib);
- new_entries = kmem_alloc(new_size, KM_SLEEP);
+ new_entries = vmem_alloc(new_size, KM_SLEEP);
if (old_size > 0) {
bcopy(vib->vib_entries, new_entries, old_size);
- kmem_free(vib->vib_entries, old_size);
+ vmem_free(vib->vib_entries, old_size);
}
new_entries[vib->vib_phys->vib_count - 1] = vibe;
vib->vib_entries = new_entries;