|  | 
| 26 | 26 |  * Copyright (c) 2017, Nexenta Systems, Inc.  All rights reserved. | 
| 27 | 27 |  * Copyright (c) 2019, loli10K <[email protected]>. All rights reserved. | 
| 28 | 28 |  * Copyright (c) 2020, George Amanakis. All rights reserved. | 
|  | 29 | + * Copyright (c) 2020 by George Melikov. All rights reserved. | 
| 29 | 30 |  */ | 
| 30 | 31 | 
 | 
| 31 | 32 | /* | 
| @@ -1755,7 +1756,7 @@ arc_hdr_authenticate(arc_buf_hdr_t *hdr, spa_t *spa, uint64_t dsobj) | 
| 1755 | 1756 | 		abd_take_ownership_of_buf(abd, B_TRUE); | 
| 1756 | 1757 | 
 | 
| 1757 | 1758 | 		csize = zio_compress_data(HDR_GET_COMPRESS(hdr), | 
| 1758 |  | -		    hdr->b_l1hdr.b_pabd, tmpbuf, lsize); | 
|  | 1759 | +		    hdr->b_l1hdr.b_pabd, tmpbuf, lsize, 0); | 
| 1759 | 1760 | 		ASSERT3U(csize, <=, psize); | 
| 1760 | 1761 | 		abd_zero_off(abd, csize, psize - csize); | 
| 1761 | 1762 | 	} | 
| @@ -8531,7 +8532,8 @@ l2arc_apply_transforms(spa_t *spa, arc_buf_hdr_t *hdr, uint64_t asize, | 
| 8531 | 8532 | 		cabd = abd_alloc_for_io(asize, ismd); | 
| 8532 | 8533 | 		tmp = abd_borrow_buf(cabd, asize); | 
| 8533 | 8534 | 
 | 
| 8534 |  | -		psize = zio_compress_data(compress, to_write, tmp, size); | 
|  | 8535 | +		psize = zio_compress_data(compress, to_write, tmp, size, | 
|  | 8536 | +		    spa->spa_max_ashift); | 
| 8535 | 8537 | 		ASSERT3U(psize, <=, HDR_GET_PSIZE(hdr)); | 
| 8536 | 8538 | 		if (psize < asize) | 
| 8537 | 8539 | 			bzero((char *)tmp + psize, asize - psize); | 
| @@ -9899,7 +9901,7 @@ l2arc_log_blk_commit(l2arc_dev_t *dev, zio_t *pio, l2arc_write_callback_t *cb) | 
| 9899 | 9901 | 	/* try to compress the buffer */ | 
| 9900 | 9902 | 	list_insert_tail(&cb->l2wcb_abd_list, abd_buf); | 
| 9901 | 9903 | 	psize = zio_compress_data(ZIO_COMPRESS_LZ4, | 
| 9902 |  | -	    abd_buf->abd, tmpbuf, sizeof (*lb)); | 
|  | 9904 | +	    abd_buf->abd, tmpbuf, sizeof (*lb), dev->l2ad_spa->spa_max_ashift); | 
| 9903 | 9905 | 
 | 
| 9904 | 9906 | 	/* a log block is never entirely zero */ | 
| 9905 | 9907 | 	ASSERT(psize != 0); | 
|  | 
0 commit comments