diff options
author | mav <mav@FreeBSD.org> | 2015-10-03 07:26:48 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-03 07:26:48 +0000 |
commit | 21d16f9dcd16d9ed664deee897d47b49f9091be0 (patch) | |
tree | c5220ed3b64f161dc3a792cc3660549346589544 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c | |
parent | 30536f13379b946f200eeda283ef270142ace62b (diff) | |
download | FreeBSD-src-21d16f9dcd16d9ed664deee897d47b49f9091be0.zip FreeBSD-src-21d16f9dcd16d9ed664deee897d47b49f9091be0.tar.gz |
MFC r286556: Avoid 128K kmem allocations in mzap_upgrade()
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Rich Lowe <richlowe@richlowe.net>
illumos/illumos-gate@be3e2ab906b80af79c7b22885f279e45ad8fb995
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c index 26377b6..9f9ff02 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c @@ -547,7 +547,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags) ASSERT(RW_WRITE_HELD(&zap->zap_rwlock)); sz = zap->zap_dbuf->db_size; - mzp = kmem_alloc(sz, KM_SLEEP); + mzp = zio_buf_alloc(sz); bcopy(zap->zap_dbuf->db_data, mzp, sz); nchunks = zap->zap_m.zap_num_chunks; @@ -555,7 +555,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags) err = dmu_object_set_blocksize(zap->zap_objset, zap->zap_object, 1ULL << fzap_default_block_shift, 0, tx); if (err) { - kmem_free(mzp, sz); + zio_buf_free(mzp, sz); return (err); } } @@ -581,7 +581,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags) if (err) break; } - kmem_free(mzp, sz); + zio_buf_free(mzp, sz); *zapp = zap; return (err); } |