From: Gao Xiang <xiang@kernel.org>
To: Nikhil Gurudasani <nikhilgurudasani314@gmail.com>
Cc: Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>,
Yue Hu <zbestahu@gmail.com>,
Jeffle Xu <jefflexu@linux.alibaba.com>,
Sandeep Dhavale <dhavale@google.com>,
Hongbo Li <hongbohbli@tencent.com>,
Chunhai Guo <guochunhai@vivo.com>,
linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] erofs: preserve LZMA decoders on resize failure
Date: Wed, 2 Sep 2026 10:30:41 +0800 [thread overview]
Message-ID: <apeKUdpJhf_NlKR4@192.168.5.22> (raw)
In-Reply-To: <20260830104109.60639-1-nikhilgurudasani314@gmail.com>
On Sun, Aug 30, 2026 at 04:11:09PM +0530, Nikhil Gurudasani wrote:
> The pool-resize path frees each stream's old decoder before allocating
> its replacement. If an allocation fails after some streams have already
> been replaced, the failed stream is put back on the list with state ==
> NULL. z_erofs_lzma_max_dictsize is still advanced as if the whole
> pool had been resized.
>
> An existing LZMA mount can select the broken stream and pass
> NULL to xz_dec_microlzma_reset(). A retry at the same size also
> skip another resize attempt. Since the global maximum was advanced,
> thus, the invalid state is left unrepaired.
>
> Allocate each replacement before freeing the old decoder, temporarily
> retaining one old decoder during allocation. Stop at the first failure
> and advance z_erofs_lzma_max_dictsize only after all streams satisfy
> the request.
>
> Record each stream's dictionary capacity so retries can skip streams
> already enlarged before a partial failure.
>
> Fixes: 622ceaddb764 ("erofs: lzma compression support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Nikhil Gurudasani <nikhilgurudasani314@gmail.com>
Reviewed-by: Gao Xiang <xiang@kernel.org>
Thanks,
Gao Xiang
prev parent reply other threads:[~2026-09-02 2:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 10:41 Nikhil Gurudasani
2026-09-02 2:30 ` Gao Xiang [this message]
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=apeKUdpJhf_NlKR4@192.168.5.22 \
--to=xiang@kernel.org \
--cc=chao@kernel.org \
--cc=dhavale@google.com \
--cc=guochunhai@vivo.com \
--cc=hongbohbli@tencent.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhilgurudasani314@gmail.com \
--cc=zbestahu@gmail.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
all inboxes | Powered by JetHome®