zio.c (253992) | zio.c (254591) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1123 unchanged lines hidden (view full) --- 1132 compress = ZIO_COMPRESS_OFF; 1133 1134 /* Make sure someone doesn't change their mind on overwrites */ 1135 ASSERT(MIN(zp->zp_copies + BP_IS_GANG(bp), 1136 spa_max_replication(spa)) == BP_GET_NDVAS(bp)); 1137 } 1138 1139 if (compress != ZIO_COMPRESS_OFF) { | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1123 unchanged lines hidden (view full) --- 1132 compress = ZIO_COMPRESS_OFF; 1133 1134 /* Make sure someone doesn't change their mind on overwrites */ 1135 ASSERT(MIN(zp->zp_copies + BP_IS_GANG(bp), 1136 spa_max_replication(spa)) == BP_GET_NDVAS(bp)); 1137 } 1138 1139 if (compress != ZIO_COMPRESS_OFF) { |
1140 metaslab_class_t *mc = spa_normal_class(spa); |
|
1140 void *cbuf = zio_buf_alloc(lsize); | 1141 void *cbuf = zio_buf_alloc(lsize); |
1141 psize = zio_compress_data(compress, zio->io_data, cbuf, lsize); | 1142 psize = zio_compress_data(compress, zio->io_data, cbuf, lsize, 1143 (size_t)metaslab_class_get_minblocksize(mc)); |
1142 if (psize == 0 || psize == lsize) { 1143 compress = ZIO_COMPRESS_OFF; 1144 zio_buf_free(cbuf, lsize); 1145 } else { 1146 ASSERT(psize < lsize); 1147 zio_push_transform(zio, cbuf, psize, lsize, NULL); 1148 } 1149 } --- 2152 unchanged lines hidden --- | 1144 if (psize == 0 || psize == lsize) { 1145 compress = ZIO_COMPRESS_OFF; 1146 zio_buf_free(cbuf, lsize); 1147 } else { 1148 ASSERT(psize < lsize); 1149 zio_push_transform(zio, cbuf, psize, lsize, NULL); 1150 } 1151 } --- 2152 unchanged lines hidden --- |