From owner-svn-src-head@freebsd.org Wed Aug 19 10:25:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFF579BD239; Wed, 19 Aug 2015 10:25:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 15173113F; Wed, 19 Aug 2015 10:25:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA13903; Wed, 19 Aug 2015 13:24:57 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZS0YD-000AiH-7N; Wed, 19 Aug 2015 13:24:57 +0300 Subject: Re: svn commit: r286776 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201508141343.t7EDhCJ5058696@repo.freebsd.org> From: Andriy Gapon Message-ID: <55D45942.6050608@FreeBSD.org> Date: Wed, 19 Aug 2015 13:24:02 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <201508141343.t7EDhCJ5058696@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2015 10:25:07 -0000 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