From owner-svn-src-all@FreeBSD.ORG Thu Oct 16 22:20:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C213D574; Thu, 16 Oct 2014 22:20:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0BA9FD; Thu, 16 Oct 2014 22:20:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GMKd0e015894; Thu, 16 Oct 2014 22:20:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GMKd6D015893; Thu, 16 Oct 2014 22:20:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410162220.s9GMKd6D015893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 16 Oct 2014 22:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273192 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 22:20:39 -0000 Author: delphij Date: Thu Oct 16 22:20:38 2014 New Revision: 273192 URL: https://svnweb.freebsd.org/changeset/base/273192 Log: MFS r273191: MFC r273060: Use write_psize instead of write_asize when doing vdev_space_update. Without this change the accounting of L2ARC usage would be wrong and give 16EB free space because the number became negative and overflows. Approved by: re (gjb) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 16 22:12:23 2014 (r273191) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 16 22:20:38 2014 (r273192) @@ -5163,7 +5163,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end.