svn commit: r286556 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Sun Aug 9 20:41:45 UTC 2015
Author: mav
Date: Sun Aug 9 20:41:44 2015
New Revision: 286556
URL: https://svnweb.freebsd.org/changeset/base/286556
Log:
MFV 286555: Avoid 128K kmem allocations in mzap_upgrade()
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Prakash Surya <prakash.surya at delphix.com>
Reviewed by: George Wilson <george at delphix.com>
Reviewed by: Steven Hartland <killing at multiplay.co.uk>
Approved by: Rich Lowe <richlowe at richlowe.net>
illumos/illumos-gate at be3e2ab906b80af79c7b22885f279e45ad8fb995
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:41:23 2015 (r286555)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:41:44 2015 (r286556)
@@ -547,7 +547,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx,
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,
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,
if (err)
break;
}
- kmem_free(mzp, sz);
+ zio_buf_free(mzp, sz);
*zapp = zap;
return (err);
}
More information about the svn-src-head
mailing list