diff options
author | Alexander Motin <mav@FreeBSD.org> | 2016-11-17 20:44:51 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2016-11-17 20:44:51 +0000 |
commit | eb9bfc257d53198a460ad8dc4c3cd484ab7b6a0c (patch) | |
tree | 52dff00a61541192efb593a86708aae64c7bdcf2 | |
parent | 2edc027cf0ab9c58d2778c54937f5cabeac4f233 (diff) |
Notes
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c index 6d58078a5d9f..de8b64397068 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c @@ -1142,11 +1142,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t); -#ifdef __FreeBSD__ - if (offsetof(itx_t, itx_lr) + lrsize > PAGE_SIZE) - itx = zio_buf_alloc(offsetof(itx_t, itx_lr) + lrsize); - else -#endif itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; @@ -1160,11 +1155,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) void zil_itx_destroy(itx_t *itx) { -#ifdef __FreeBSD__ - if (offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen > PAGE_SIZE) - zio_buf_free(itx, offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen); - else -#endif kmem_free(itx, offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen); } @@ -1184,7 +1174,8 @@ zil_itxg_clean(itxs_t *itxs) list = &itxs->i_sync_list; while ((itx = list_head(list)) != NULL) { list_remove(list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } cookie = NULL; @@ -1193,7 +1184,8 @@ zil_itxg_clean(itxs_t *itxs) list = &ian->ia_list; while ((itx = list_head(list)) != NULL) { list_remove(list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } list_destroy(list); kmem_free(ian, sizeof (itx_async_node_t)); @@ -1258,7 +1250,8 @@ zil_remove_async(zilog_t *zilog, uint64_t oid) } while ((itx = list_head(&clean_list)) != NULL) { list_remove(&clean_list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } list_destroy(&clean_list); } @@ -1508,7 +1501,8 @@ zil_commit_writer(zilog_t *zilog) if (txg > spa_last_synced_txg(spa) || txg > spa_freeze_txg(spa)) lwb = zil_lwb_commit(zilog, itx, lwb); list_remove(&zilog->zl_itx_commit_list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } DTRACE_PROBE1(zil__cw2, zilog_t *, zilog); |