Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3600751pxb; Wed, 13 Oct 2021 09:08:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz199jjhYnJE2gjZ+ZPhevUsmykap+LhDz0D6rd0hIt+s6WmyidOgr7Y/fizzyvtYCx0gat X-Received: by 2002:a17:906:2da2:: with SMTP id g2mr191665eji.38.1634141337441; Wed, 13 Oct 2021 09:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634141337; cv=none; d=google.com; s=arc-20160816; b=kvKPK+DXTssXI0PTF3q92K5fGLugclYm6EUZYZF1B29eH81Lp2HzhvMikcyDTMLCaN sOsYOK0RvaHoGdxCQtYnJ8vJEDpxme0JqC4TQWEkSpDTE1cpC9ogsPnaKGRzcvwn+nw3 Ix/htaEwd6j1yE3RWvZuqigMBnML33ilwJP7galuy2oZX3W5xmi8aBR4Z4wBPjUwG9qI VXsWR7amPYOtS9FczuzAyDOYs8LBAq5RcNSRp/wDo/TXp2qEOmdvaN8cv/GsLiBDZ6Kd Oc8sGDJ+i0Sk3EQX5ZDvJ0l7YPen7KKJ2Z/aL9vBoSMWy2c4W8fS61/bA1Dxicc9Wj5U GLyw== 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=DVgZgnAuBl6FcOEHZ8kOoGH2NSY8x/c+P0xQRSIjDQ8=; b=p0pXbrzUZkaR/azucRmWV52JJY6AK6kEIXw+s1ECEtUWOnYutsTGqmz+Fbn0t3gaxm uCTfP0hZkeYxAFpxTrlevM+5xVh/JNbxQcdczzLg8SN9kRv1x1tASEiC0l4RKDkLkA9I aFuw7FdYzh0Oxj7ytF7KjzzvzVIcr3s/MlMOEaxhVBp3H6KbWXo3VuS7gFNzfXGm/wo/ z949wJGhgzD3oCSWJHFnCFCUQAiaHzBF4GngbMWZtKbOo2Ipttoz8DOyegvudIv3HZHA 4fkYqvfawKPGk4ke/bLcX7mzW0KyP+yLV2GEOgtguKFYq0CRgUz6/5eGgBZ/jM/8UB0B P7Rg== 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 di4si18377155edb.89.2021.10.13.09.08.15; Wed, 13 Oct 2021 09:08:57 -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 S235372AbhJMQFK (ORCPT + 99 others); Wed, 13 Oct 2021 12:05:10 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:46201 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbhJMQFJ (ORCPT ); Wed, 13 Oct 2021 12:05:09 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Uri.wud_1634140982; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Uri.wud_1634140982) by smtp.aliyun-inc.com(127.0.0.1); Thu, 14 Oct 2021 00:03:04 +0800 Date: Thu, 14 Oct 2021 00:03:02 +0800 From: Gao Xiang To: Yue Hu Cc: Yue Hu , xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, huyue2@yulong.com, zhangwen@yulong.com Subject: Re: [PATCH] erofs: fix the per-CPU buffer decompression for small output size Message-ID: References: <20211013092906.1434-1-zbestahu@gmail.com> <20211013211005.7bd9fc08.zbestahu@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211013211005.7bd9fc08.zbestahu@163.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 09:10:05PM +0800, Yue Hu wrote: > Hi Xiang, > > On Wed, 13 Oct 2021 19:51:55 +0800 > Gao Xiang wrote: > > > 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. > > Yes, i just find the issue when i try to implement a new feature of > tail-packing inline compressed data. No problem in my current version. Yeah, please help update the return value of z_erofs_lz4_decompress() and get rid of such unneeded fast path. Thanks, Gao Xiang > > Thanks. > > > > > 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 >