From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@redhat.com>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: short circuit xfs_growfs_data_private() if delta is zero
Date: Thu, 14 Dec 2023 20:19:11 -0800 [thread overview]
Message-ID: <ZXvTv9XtthEdd1AF@infradead.org> (raw)
In-Reply-To: <a6a7bfa4-a7bb-4103-9887-63c69356d187@redhat.com>
On Thu, Dec 14, 2023 at 01:28:08PM -0600, Eric Sandeen wrote:
> Although xfs_growfs_data() doesn't call xfs_growfs_data_private()
> if in->newblocks == mp->m_sb.sb_dblocks, xfs_growfs_data_private()
> further massages the new block count so that we don't i.e. try
> to create a too-small new AG.
>
> This may lead to a delta of "0" in xfs_growfs_data_private(), so
> we end up in the shrink case and emit the EXPERIMENTAL warning
> even if we're not changing anything at all.
>
> Fix this by returning straightaway if the block delta is zero.
>
> (nb: in older kernels, the result of entering the shrink case
> with delta == 0 may actually let an -ENOSPC escape to userspace,
> which is confusing for users.)
>
> Fixes: fb2fc1720185 ("xfs: support shrinking unused space in the last AG")
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2023-12-15 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 19:28 [PATCH] xfs: short circuit xfs_growfs_data_private() if delta is zero Eric Sandeen
2023-12-14 20:14 ` Darrick J. Wong
2023-12-15 4:19 ` Christoph Hellwig [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=ZXvTv9XtthEdd1AF@infradead.org \
--to=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.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