Restore part of r274628, reverted at r286776.

Submitted by:	avg
This commit is contained in:
Alexander Motin 2015-08-20 07:41:33 +00:00
parent d3fdd08cf3
commit 602015fd15
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286951

View File

@ -6509,7 +6509,8 @@ l2arc_compress_buf(arc_buf_hdr_t *hdr)
csize = zio_compress_data(ZIO_COMPRESS_LZ4, hdr->b_l1hdr.b_tmp_cdata,
cdata, l2hdr->b_asize);
rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE);
rounded = P2ROUNDUP(csize,
(size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift);
if (rounded > csize) {
bzero((char *)cdata + csize, rounded - csize);
csize = rounded;