From f42d7f4111f754b0f77e5982278fc79d31408d8c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 3 Apr 2015 09:12:02 -0700 Subject: [PATCH] Use vmem_alloc() in spa_config_write() The packed nvlist allocated in spa_config_write() may exceed the warning threshold for large configurations. Use the vmem interfaces for this short lived allocation. Signed-off-by: Brian Behlendorf Closes #3251 --- module/zfs/spa_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c index 624bcb7887..e846ec9adc 100644 --- a/module/zfs/spa_config.c +++ b/module/zfs/spa_config.c @@ -167,7 +167,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) */ VERIFY(nvlist_size(nvl, &buflen, NV_ENCODE_XDR) == 0); - buf = kmem_alloc(buflen, KM_SLEEP); + buf = vmem_alloc(buflen, KM_SLEEP); temp = kmem_zalloc(MAXPATHLEN, KM_SLEEP); VERIFY(nvlist_pack(nvl, &buf, &buflen, NV_ENCODE_XDR, @@ -191,7 +191,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) (void) vn_remove(temp, UIO_SYSSPACE, RMFILE); - kmem_free(buf, buflen); + vmem_free(buf, buflen); kmem_free(temp, MAXPATHLEN); }