Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3376525pxb; Wed, 13 Oct 2021 04:54:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxabfZR++kKWgGZQgrvH8ZV5gFNnJbkCAmTydPmsEotUlqslCi2Di8qw9WZeNZkqzBKUxwa X-Received: by 2002:a17:90b:370f:: with SMTP id mg15mr12922667pjb.209.1634126086866; Wed, 13 Oct 2021 04:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634126086; cv=none; d=google.com; s=arc-20160816; b=wQv4y2eslkRrw4dN7RlpFlNWtGOG8ItAsd2xTMCG2iI7EWLWY0Gbpm+6yEWs9eg8aE fAO6rF5AVNcB9FHLpkdxngUa2XhnS+LOAO2eBD+BpQCzhdVYcuUBot5xBlsLFGcX95FR +hrj3VrlrUtmIUWK/kw+SAp/wFCnt1ldlRup91Q8vWLCMX/K9Tc5w4TLHRTlX/P6KH6E ZC5E1YhTCA1Crm6eVgwQvk2QpQisnV/yxJJwewv4Lh5xvj2BrBofKzQETGtQoVoe4AXr 28x4d4bNztZrmEO1qI6/g635W4WR5NkMfBPEu3/SyziRiYKqgkn4BkdnJ3+nDEyeK6Jz kT1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2xv/xpI9lwc3hOuX2sMd01v4g1jLN2x/A0+uoWFjZ5s=; b=vexNvO3Oc4w/79U7cDKvpuiaStT6Bfl3uejXtPo00N5jh1JyShFGIOeaMIFGaFgDTF soV6ixXAYx6yD0Gj0Ik4EIlHiwnDLjNLGVLdLrcQZZYTem+eyacjHP8pi/iJHDJU4uMf j4B+JJ48hRGa9dPMVLaCV/RbL0rWaLVKhPDJctKCzew063tWuUGMHSCYgOCZkW36/f7R zRJnUc5mUN3T3mL+ASof9hT0gogUGe07TfxmLUuAG/KUqUOcu7zYIjlEfgQhWiom1D+I 58ruI532Ff4yMUf7FO5tsA8YA7aVFn6XV5FKpH6Muf65APJXJjgELYJJXANBbmvuB5Lm UIuA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l64si17550493pgd.574.2021.10.13.04.54.33; Wed, 13 Oct 2021 04:54:46 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbhJMLyE (ORCPT + 99 others); Wed, 13 Oct 2021 07:54:04 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:54879 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhJMLyD (ORCPT ); Wed, 13 Oct 2021 07:54:03 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UrgqRZm_1634125916; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0UrgqRZm_1634125916) by smtp.aliyun-inc.com(127.0.0.1); Wed, 13 Oct 2021 19:51:57 +0800 Date: Wed, 13 Oct 2021 19:51:55 +0800 From: Gao Xiang To: Yue Hu Cc: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, huyue2@yulong.com, zhangwen@yulong.com, zbestahu@163.com Subject: Re: [PATCH] erofs: fix the per-CPU buffer decompression for small output size Message-ID: References: <20211013092906.1434-1-zbestahu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211013092906.1434-1-zbestahu@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yue, On Wed, Oct 13, 2021 at 05:29:05PM +0800, Yue Hu wrote: > From: Yue Hu > > Note that z_erofs_lz4_decompress() will return a positive value if > decompression succeeds. However, we do not copy_from_pcpubuf() due > to !ret. Let's fix it. > > Signed-off-by: Yue Hu Thanks for catching this. This is a valid issue, but it has no real impact to the current kernels since such pcluster in practice will be !inplace_io and trigger "if (nrpages_out == 1 && !rq->inplace_io) {" above for upstream strategies. Our customized lz4 implementation will return 0 if success instead, so it has no issue to our previous products as well. For such cases, how about updating z_erofs_lz4_decompress() to return 0 if success instead rather than outputsize. Since I'll return 0 if success for LZMA as well. Thanks, Gao Xiang