Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 2015 13:24:02 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r286776 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <55D45942.6050608@FreeBSD.org>
In-Reply-To: <201508141343.t7EDhCJ5058696@repo.freebsd.org>
References:  <201508141343.t7EDhCJ5058696@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55D45942.6050608>