arc.c (251631) | arc.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 --- 5133 unchanged lines hidden (view full) --- 5142 size_t csize, len; 5143 5144 ASSERT(l2hdr->b_compress == ZIO_COMPRESS_OFF); 5145 ASSERT(l2hdr->b_tmp_cdata != NULL); 5146 5147 len = l2hdr->b_asize; 5148 cdata = zio_data_buf_alloc(len); 5149 csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, | 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 --- 5133 unchanged lines hidden (view full) --- 5142 size_t csize, len; 5143 5144 ASSERT(l2hdr->b_compress == ZIO_COMPRESS_OFF); 5145 ASSERT(l2hdr->b_tmp_cdata != NULL); 5146 5147 len = l2hdr->b_asize; 5148 cdata = zio_data_buf_alloc(len); 5149 csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, |
5150 cdata, l2hdr->b_asize); | 5150 cdata, l2hdr->b_asize, (size_t)SPA_MINBLOCKSIZE); |
5151 5152 if (csize == 0) { 5153 /* zero block, indicate that there's nothing to write */ 5154 zio_data_buf_free(cdata, len); 5155 l2hdr->b_compress = ZIO_COMPRESS_EMPTY; 5156 l2hdr->b_asize = 0; 5157 l2hdr->b_tmp_cdata = NULL; 5158 ARCSTAT_BUMP(arcstat_l2_compress_zeros); --- 367 unchanged lines hidden --- | 5151 5152 if (csize == 0) { 5153 /* zero block, indicate that there's nothing to write */ 5154 zio_data_buf_free(cdata, len); 5155 l2hdr->b_compress = ZIO_COMPRESS_EMPTY; 5156 l2hdr->b_asize = 0; 5157 l2hdr->b_tmp_cdata = NULL; 5158 ARCSTAT_BUMP(arcstat_l2_compress_zeros); --- 367 unchanged lines hidden --- |