The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Gao Xiang <xiang@kernel.org>
To: Nikhil Gurudasani <nikhilgurudasani314@gmail.com>
Cc: xiang@kernel.org, chao@kernel.org, zbestahu@gmail.com,
	jefflexu@linux.alibaba.com, dhavale@google.com,
	hongbohbli@tencent.com, guochunhai@vivo.com,
	linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] erofs: skip sufficiently large global buffers when resizing
Date: Sun, 23 Aug 2026 20:59:15 +0800	[thread overview]
Message-ID: <aoruo-aVZ0IHJ58G@XiangdeMacBook-Pro.local> (raw)
In-Reply-To: <20260822140017.8119-1-nikhilgurudasani314@gmail.com>

On Sat, Aug 22, 2026 at 07:30:17PM +0530, Nikhil Gurudasani wrote:
> z_erofs_gbuf_nrpages is advanced only after every global buffer has been
> grown. If a resize fails after some buffers were enlarged, a retry
> revisits those enlarged buffers.
> 
> Retrying the same size then returns -ENOMEM because alloc_pages_bulk()
> has no pages to add and the unchanged return value is treated as a
> failure. Retrying an intermediate size allocates a temporary pointer
> array smaller than gbuf->nrpages and copies more existing pointers than
> the array can hold.
> 
> Skip buffers that already satisfy the request. Once all remaining
> buffers have caught up, advancing z_erofs_gbuf_nrpages again describes
> the guaranteed minimum size across the pool.
> 
> Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()")
> Cc: stable@vger.kernel.org # 6.10+
> Signed-off-by: Nikhil Gurudasani <nikhilgurudasani314@gmail.com>

Reviewed-by: Gao Xiang <xiang@kernel.org>

Thanks,
Gao Xiang

  reply	other threads:[~2026-08-23 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 14:00 [PATCH] erofs: skip sufficiently large global buffers when resizing Nikhil Gurudasani
2026-08-23 12:59 ` Gao Xiang [this message]
2026-08-24  0:57 ` Chao Yu

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=aoruo-aVZ0IHJ58G@XiangdeMacBook-Pro.local \
    --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=stable@vger.kernel.org \
    --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