diff options
author | Brian Behlendorf <[email protected]> | 2015-04-03 09:12:02 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-04-07 15:10:19 -0700 |
commit | f42d7f4111f754b0f77e5982278fc79d31408d8c (patch) | |
tree | 1f8d461e6897f4fa7e56d7371a58c9b769c4987a /module/zfs/spa_config.c | |
parent | 40d06e3c78c23b199dfd9284809e710fab549391 (diff) |
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 <[email protected]>
Closes #3251
Diffstat (limited to 'module/zfs/spa_config.c')
-rw-r--r-- | module/zfs/spa_config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c index 624bcb788..e846ec9ad 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); } |