Received: by 2002:a05:6520:2586:b029:fa:41f3:c225 with SMTP id u6csp445634lky; Fri, 11 Jun 2021 06:25:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcPFKPk9KS6DjHcAuKgcmyO/jLMhm+Gc/UgdIVncKJhOvftmKB1hjOLRHYcm4CUhRXsdnc X-Received: by 2002:aa7:c04d:: with SMTP id k13mr3764017edo.122.1623417950527; Fri, 11 Jun 2021 06:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623417950; cv=none; d=google.com; s=arc-20160816; b=Dr/G0YpQ/AQzJ9msMEHReBOT+grN3n36aZiHT2939AbT+OpqPx2pU2eiYn0VEfKZc/ MU8ZwsaYgs164w9RvGJsJIk+fY1VWma4zx1l/N8yOFPlGKq2s5jK01knZzWmwjRXfS74 +Iq8k2S13kLKdZvRJxg6Dd+dTkaiTs+XsyKjAPAGKOLe9zDA1gEoJ6w1QqEKbmULRP7U 6RoEGG6+rXYtGcH+iNSpuLEfML0iLkkof/iHKu/es8GEXsjfMaxDpqBxY55qIyMVr4k0 xyVVOvodcE2h6dGuXp4XvUTewZNF+cmQvEs4te/sEZ8UNojZ9SjNPoWtuqwjJ2vf/abr 0AcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=IoZe2Do+YjFfznb3FBAGTMrmvEaWFCHdUpFU1G49nbI=; b=eCuA0fsieDMGExUV3D/6NLWtEd7ljuOo7NXeAT39OzBVLdTn9TNv8q91JsL7qwGRtN VcTezmbGnSoWoI/a0480Ea76ojdgROub/YRN62QVnmHgat6JIgsl2ltgsxpQCEwpVCRH sVw4oDTZJuOfN7WLLvTn1eEnyvNqzc6c78sCiG/GLn+EfEGKCwsux9NntoYwaqbx8dX4 t2+MPWPcHCTr73752yoivywl0MteJjZQZ3to7YvcG2dTNzqAXZvt2B52FCMYZOWcuRBQ e6NPXz7VtFiW1+oWokCwnKThSXcMejgnq86EXD8Zf3UrK+IA9S9ZVSlcJnwrgTiyBWcN Pu7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="DsPjPdR/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si5077828edq.76.2021.06.11.06.25.27; Fri, 11 Jun 2021 06:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="DsPjPdR/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbhFKN0H (ORCPT + 99 others); Fri, 11 Jun 2021 09:26:07 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:38436 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbhFKN0G (ORCPT ); Fri, 11 Jun 2021 09:26:06 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 8CB8721994; Fri, 11 Jun 2021 13:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623417847; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IoZe2Do+YjFfznb3FBAGTMrmvEaWFCHdUpFU1G49nbI=; b=DsPjPdR/cfZoznWMhaKw2jCReQocGLnq0vEnJz7X8/bGQYVgpxy7wp95U5fUoz1M7KM78/ lO2UK4i5tLunQSK1zEYRN1rTnR+kGQ05PFOwnRnWD6Fd6xeLJGkm/Jf2XaAB9oJSQApAgB F2wxrLlTZqOTDKnNZkF7+OqUsTJI2GI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623417847; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IoZe2Do+YjFfznb3FBAGTMrmvEaWFCHdUpFU1G49nbI=; b=3WXO5EAErIRttTmkRzoLqskq1oqP9k1xWfNAPTGWce7kDcJB+FkFYeIsKAoU0vg9toUpFm f+ez2JLbfaxrODBA== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 661FAA3BBB; Fri, 11 Jun 2021 13:24:07 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 43475DA7A2; Fri, 11 Jun 2021 15:21:22 +0200 (CEST) Date: Fri, 11 Jun 2021 15:21:22 +0200 From: David Sterba To: Chris Mason Cc: "dsterba@suse.cz" , Christophe Leroy , Josef Bacik , David Sterba , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , linux-btrfs , "linux-hexagon@vger.kernel.org" Subject: Re: [PATCH] btrfs: Disable BTRFS on platforms having 256K pages Message-ID: <20210611132121.GF28158@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Chris Mason , Christophe Leroy , Josef Bacik , David Sterba , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , linux-btrfs , "linux-hexagon@vger.kernel.org" References: <185278AF-1D87-432D-87E9-C86B3223113E@fb.com> <20210610162046.GB28158@suse.cz> <6769ED4C-15A8-4CFF-BF2B-26A5328257A0@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6769ED4C-15A8-4CFF-BF2B-26A5328257A0@fb.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 11, 2021 at 12:58:58PM +0000, Chris Mason wrote: > > On Jun 10, 2021, at 12:20 PM, David Sterba wrote: > > On Thu, Jun 10, 2021 at 04:50:09PM +0200, Christophe Leroy wrote: > >> Le 10/06/2021 ? 15:54, Chris Mason a ?crit : > >>>> On Jun 10, 2021, at 1:23 AM, Christophe Leroy wrote: > > And there's no such thing like "just bump BTRFS_MAX_COMPRESSED to 256K". > > The constant is part of on-disk format for lzo and otherwise changing it > > would impact performance so this would need proper evaluation. > > Sorry, how is it baked into LZO? It definitely will have performance implications, I agree there. lzo_decompress_bio: 309 /* 310 * Compressed data header check. 311 * 312 * The real compressed size can't exceed the maximum extent length, and 313 * all pages should be used (whole unused page with just the segment 314 * header is not possible). If this happens it means the compressed 315 * extent is corrupted. 316 */ 317 if (tot_len > min_t(size_t, BTRFS_MAX_COMPRESSED, srclen) || 318 tot_len < srclen - PAGE_SIZE) { 319 ret = -EUCLEAN; 320 goto done; 321 }