From owner-svn-src-head@FreeBSD.ORG Fri Nov 21 20:25:41 2014 Return-Path: Delivered-To: svn-src-head@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 05BB2FFC; Fri, 21 Nov 2014 20:25:41 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DE6F6785; Fri, 21 Nov 2014 20:25:40 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 67007FEF0; Fri, 21 Nov 2014 12:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1416601540; x=1416615940; bh=YgtbqNa7DESHNsZ5ALukFYOYzlZTAKIsglTGyyGLAdw=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=CC3lXxzvYdm5T1FuDEojyCkjMlXHTPxcssuZAxwZA74nKNM3+U0XTJ9jJ+mPXnE1B MHqu09gqAWLi4KO5xvYdOV0SFw+pE5hOZ0B7u/pjir9xs/Z71WLga/66etCtDZQvJZ 8ZkdHXBXa36EEKwKA+lJDW6WFEN3b5pOOn59gpE0= Message-ID: <546F9FC3.10402@delphij.net> Date: Fri, 21 Nov 2014 12:25:39 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Andriy Gapon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r273060 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201410132039.s9DKdpmh055573@svn.freebsd.org> <546F57B1.2020602@FreeBSD.org> In-Reply-To: <546F57B1.2020602@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 21 Nov 2014 20:25:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 11/21/14 07:18, Andriy Gapon wrote: > On 13/10/2014 23:39, Xin LI wrote: >> Author: delphij Date: Mon Oct 13 20:39:51 2014 New Revision: >> 273060 URL: https://svnweb.freebsd.org/changeset/base/273060 >> >> Log: 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. >> >> Obtained from: FreeNAS (issue #6239) > > First, a link to the issue would be more convenient for reviewers. > Here it is https://bugs.freenas.org/issues/6239 > > Then, I would like to see a technical explanation for this change. > I could not find any explanation here or in the FreeNAS issue or in > the FreeNAS commit. > > As far as I can see, all calls to vdev_space_update() in the ARC > code are passed l2hdr->b_asize or a sum of b_asize fields of > multiple buffers. Thus, I am really surprised with this change and > would like to see reasoning behind it. Hmm I think you are right that my change doesn't make sense but I can't remember the details either and suggests there is some other issues that was covered up by this. It looks like that I was confused because the L2ARC clock hand advances by buf_p_sz (unrelated but it should really be called buf_a_size) and the way we calculate allocated L2ARC free. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJUb5/DAAoJEJW2GBstM+nsJ9QQAI1r3y0dcQNegsfF997C5Kx/ kbS8qG9gmlwHwYlt7Q4RWH8z+kpo4poSrTz3i/0JaLBM5GN3NYq4LqVDIvX0MF4N wY8y1Fv8u6HVoor7gM0YbCXsAG7KJXHP+vj8MlczFiHdyK6Rl0HAiifMPUM1ie2I LHhmzSCzYsp8SJ2w+ggnwZQjTfJH+nwbcEHc9+2ke7u7cgb/pRuRMX8CfP6B6zfM +kOszv4UIp0xa8wA4ER/Ic8NlD9f8f7767vDxa1sfvCJaIeIoTjGplqDhkMuGaCc EcGy1rDH5iSvrRi9JbwZCtasYupwNINfIuKRcBTMUtSZDPu9D/cQfC1/b3DOhX97 uJt8GLEbQL/EeSOuqQ5aSAVzC08B6sJyTxnZ2/hIM96WEGhHvUPyng5AQ9umvRV4 Es10kly/KBRcCq8MfqJkA9e4a2sEIhSZyPPs+kcnFiBfQmyXlrkQgHrgCufHUO9B V4m5wsa+snv3sJQfg3HyOavYFY51/Yi9fWAeVUKt/NAsQQaOGNrvNIb8OEZamUS8 3rujexBEaDEW9wHFt3mZiN9zzh7+ZslwvSMh+B/qsp6nnoDJ9I7QzkFNUxHzlWZg Cc7d1ezbQF3t36S8ixpUER8w2bXGfAgnURvJWf86vNXwrFEo9BHUh42mauw9kMbZ 01SCBCFFDqpIUry9GFDW =uPh8 -----END PGP SIGNATURE-----