svn commit: r286776 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Wed Aug 19 10:25:07 UTC 2015


On 14/08/2015 16:43, Alexander Motin wrote:
> Author: mav
> Date: Fri Aug 14 13:43:12 2015
> New Revision: 286776
> URL: https://svnweb.freebsd.org/changeset/base/286776
> 
> Log:
>   Remove some random accumulated diff from Illumos.
>   
>   Submitted by:	avg (partially)
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
> 

[snip]

> @@ -6514,6 +6509,12 @@ 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);
> +	if (rounded > csize) {
> +		bzero((char *)cdata + csize, rounded - csize);
> +		csize = rounded;
> +	}
> +
>  	if (csize == 0) {
>  		/* zero block, indicate that there's nothing to write */
>  		zio_data_buf_free(cdata, len);
> @@ -6522,19 +6523,11 @@ l2arc_compress_buf(arc_buf_hdr_t *hdr)
>  		hdr->b_l1hdr.b_tmp_cdata = NULL;
>  		ARCSTAT_BUMP(arcstat_l2_compress_zeros);
>  		return (B_TRUE);
> -	}
> -
> -	rounded = P2ROUNDUP(csize,
> -	    (size_t)1 << l2hdr->b_dev->l2ad_vdev->vdev_ashift);
> -	if (rounded < len) {

Alexander,

it is my fault, but this commit introduced a regression for L2ARC
devices with ashift > 9: P2ROUNDUP(1 <<
l2hdr->b_dev->l2ad_vdev->vdev_ashift) became P2ROUNDUP(SPA_MINBLOCKSIZE)
while the line got moved.

-- 
Andriy Gapon


More information about the svn-src-all mailing list