diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 11:46:09 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-31 13:41:57 -0700 |
commit | 00b46022c676e402e3f33ce93ee2983bbad2c46f (patch) | |
tree | 2204630c7abd1784f261df17cec4cd084747042f /module/zfs/spa.c | |
parent | 60101509ee73c6e61e50c0a4079097f31bb39f4b (diff) |
Add linux kernel memory support
Required kmem/vmem changes
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index e037f4133..afdfa1232 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -1270,7 +1270,7 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value) nvsize = *(uint64_t *)db->db_data; dmu_buf_rele(db, FTAG); - packed = kmem_alloc(nvsize, KM_SLEEP); + packed = kmem_alloc(nvsize, KM_SLEEP | KM_NODEBUG); error = dmu_read(spa->spa_meta_objset, obj, 0, nvsize, packed, DMU_READ_PREFETCH); if (error == 0) @@ -5217,7 +5217,7 @@ spa_sync_nvlist(spa_t *spa, uint64_t obj, nvlist_t *nv, dmu_tx_t *tx) * saves us a pre-read to get data we don't actually care about. */ bufsize = P2ROUNDUP(nvsize, SPA_CONFIG_BLOCKSIZE); - packed = kmem_alloc(bufsize, KM_SLEEP); + packed = vmem_alloc(bufsize, KM_SLEEP); VERIFY(nvlist_pack(nv, &packed, &nvsize, NV_ENCODE_XDR, KM_SLEEP) == 0); @@ -5225,7 +5225,7 @@ spa_sync_nvlist(spa_t *spa, uint64_t obj, nvlist_t *nv, dmu_tx_t *tx) dmu_write(spa->spa_meta_objset, obj, 0, bufsize, packed, tx); - kmem_free(packed, bufsize); + vmem_free(packed, bufsize); VERIFY(0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db)); dmu_buf_will_dirty(db, tx); |