From owner-freebsd-fs@freebsd.org Fri Nov 4 18:05:54 2016 Return-Path: Delivered-To: freebsd-fs@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 A6383C2F95A for ; Fri, 4 Nov 2016 18:05:54 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CCA1E62 for ; Fri, 4 Nov 2016 18:05:54 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id p190so67058821wmp.1 for ; Fri, 04 Nov 2016 11:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=ss5ZYCmnoA1gzWtW/2t2Hc7tFA8YRZs8vMrN7Nu6w88=; b=W103IDDfsgPMt3dSPT7g6h4hTJHqu5qEeEYzFqW3+kNPLRveXO7dnBVNlb7LlWiLEX oqgNd/61DikVsD5dUc/uE7k4nl928v/jG0aKpHCAvkESFPldzK8PC2DJjy00rhoe4S91 tw7QAJIvNhzkIHYoH9TF2oiSXck80BUopeJtUrVQIzFE/koi8TwH/kjlVrFQm9rrZw4/ 3S9C3ZwfVgmVXUZ5AycNEKjFBbZtpTqy0U5sFahTAbGkBpWkU6yCVnIw//NAIwtPSiBn MGcCwDSzNx/yU4mY/xfKUy3IAn+n731BzxxJHrJ0gBHwX7bzuZdT34zVN7V7KkkO12Se kuRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=ss5ZYCmnoA1gzWtW/2t2Hc7tFA8YRZs8vMrN7Nu6w88=; b=QPCqOd+QK5AHSaFWjoX2bjm+JzNk0Y/HeCz4QH2YdUez9jbWeYzTAc/t4L1eAvxxX+ II3YChyNdrlZOEl2zdqNNn6HbkWOY0tfPRYNLkinjxuNiqKqgY9EEfEhr8rzjRmC/5XQ GWK0LxudDKTUlWOazbsPEswKfdfyaCgdpImHm5iRswjV01v/SAVcLF/o8g2jiGpJGZrH 6D0z4ApOZWNtaHrww9yzVpcD8714pEqgLbfUN1rYlVwam9vLbhOK6MntnIYfqQSCN+vK Usu7Z/sISxi0YKJLwXAqVljdcXYMztbxj9rD27y5vXHxOapvyHvU0Ej0daW23HZEPT4T lfFA== X-Gm-Message-State: ABUngvfPrXlctAN2+7s8KPDK4B2Sg5TSgNEGwWiQaRPymdnibYHv5tgrZh1DV7mTtZ2trw== X-Received: by 10.28.126.146 with SMTP id z140mr4487154wmc.84.1478282752563; Fri, 04 Nov 2016 11:05:52 -0700 (PDT) Received: from [192.168.0.16] (val90-3-78-208-196-128.fbx.proxad.net. [78.208.196.128]) by smtp.gmail.com with ESMTPSA id jx8sm15491388wjc.2.2016.11.04.11.05.51 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Nov 2016 11:05:51 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: ZFS L2ARC checksum errors after compression From: Ben RUBSON In-Reply-To: <3bd7cb79-ec5a-3b7c-0642-24a7b1f001e6@FreeBSD.org> Date: Fri, 4 Nov 2016 19:05:55 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6D16D1E0-CA33-44DB-AB88-9257A8BDE67F@gmail.com> References: <921575537.20161029143626@serebryakov.spb.ru> <3dae7691-fcd1-b3b9-445c-b81d6f0cdc52@FreeBSD.org> <3bd7cb79-ec5a-3b7c-0642-24a7b1f001e6@FreeBSD.org> To: freebsd-fs X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2016 18:05:54 -0000 > On 04 Nov 2016, at 15:20, Andriy Gapon wrote: >=20 > On 03/11/2016 21:43, Lev Serebryakov wrote: >> On 29.10.2016 16:32, Andriy Gapon wrote: >>=20 >> Looks like L2ARC is unusable now if your have compression enabled on >> FSes. It shows 2x compression (ALLOC =3D 2xSIZE), and tons of = checksum >> errors. I simply don't have compressible enough data on my FSes! It = is >> mostly media files! Looks like this data is bogus. >>=20 >>> I think that a recent upstream change, compressed ARC support, = reintroduced an a >>> old problem that was fixed a while ago. >>=20 >=20 > Lev, >=20 > because of the confusing variable names I made a mistake in the patch = that I > offered you. Could you please try a new slight different patch? > (...) > + if ((write_psize + asize) > target_sz) { Do you think the issue comes from this test ? target_sz is only the threshold under which we still have to write = buffers to L2. Note that I also proposed a modification around this test in the = following PR : https://github.com/openzfs/openzfs/pull/189 Here is an extract of the interesting code : uint64_t size =3D arc_hdr_size(hdr); passed_sz +=3D size; if (passed_sz > headroom) { /* * Searched too far. */ mutex_exit(hash_lock); break; } if (!l2arc_write_eligible(guid, hdr)) { mutex_exit(hash_lock); continue; } if ((write_asize + size) > target_sz) { full =3D B_TRUE; mutex_exit(hash_lock); break; } Note that I also faced the 16.0E bug in 11.0-RC3 (which has not = compressed ARC support) : https://www.illumos.org/issues/7410 Ben