linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Yue Hu <zbestahu@gmail.com>
Cc: linux-kernel@vger.kernel.org, zbestahu@163.com,
	huyue2@yulong.com, linux-erofs@lists.ozlabs.org,
	zhangwen@yulong.com
Subject: Re: [PATCH] erofs: fix the per-CPU buffer decompression for small output size
Date: Wed, 13 Oct 2021 19:51:55 +0800	[thread overview]
Message-ID: <YWbIWydks+wpuNij@B-P7TQMD6M-0146.local> (raw)
In-Reply-To: <20211013092906.1434-1-zbestahu@gmail.com>

Hi Yue,

On Wed, Oct 13, 2021 at 05:29:05PM +0800, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
> 
> 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 <huyue2@yulong.com>

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

  reply	other threads:[~2021-10-13 11:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  9:29 [PATCH] erofs: fix the per-CPU buffer decompression for small output size Yue Hu
2021-10-13 11:51 ` Gao Xiang [this message]
2021-10-13 11:58   ` Gao Xiang
2021-10-13 13:10   ` Yue Hu
2021-10-13 16:03     ` Gao Xiang
2021-10-14  1:42       ` Yue Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YWbIWydks+wpuNij@B-P7TQMD6M-0146.local \
    --to=hsiangkao@linux.alibaba.com \
    --cc=huyue2@yulong.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zbestahu@163.com \
    --cc=zbestahu@gmail.com \
    --cc=zhangwen@yulong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).