From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, bfoster@redhat.com
Subject: Re: [PATCH 5/6] xfs: fix overfilling of reserve pool
Date: Mon, 28 Mar 2022 12:22:41 +1100 [thread overview]
Message-ID: <20220328012241.GU1544202@dread.disaster.area> (raw)
In-Reply-To: <164840032479.54920.10404960270844945481.stgit@magnolia>
On Sun, Mar 27, 2022 at 09:58:44AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Due to cycling of m_sb_lock, it's possible for multiple callers of
> xfs_reserve_blocks to race at changing the pool size, subtracting blocks
> from fdblocks, and actually putting it in the pool. The result of all
> this is that we can overfill the reserve pool to hilarious levels.
>
> xfs_mod_fdblocks, when called with a positive value, already knows how
> to take freed blocks and either fill the reserve until it's full, or put
> them in fdblocks. Use that instead of setting m_resblks_avail directly.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Another corner case fixed :)
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-03-28 1:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 16:58 [PATCHSET v4 0/6] xfs: fix incorrect reserve pool calculations and reporting Darrick J. Wong
2022-03-27 16:58 ` [PATCH 1/6] xfs: document the XFS_ALLOC_AGFL_RESERVE constant Darrick J. Wong
2022-03-28 1:18 ` Dave Chinner
2022-04-01 5:51 ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 2/6] xfs: don't include bnobt blocks when reserving free block pool Darrick J. Wong
2022-04-06 16:39 ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 3/6] xfs: remove infinite loop " Darrick J. Wong
2022-03-28 1:20 ` Dave Chinner
2022-04-06 16:40 ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 4/6] xfs: always succeed at setting the reserve pool size Darrick J. Wong
2022-03-28 1:21 ` Dave Chinner
2022-04-06 16:40 ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 5/6] xfs: fix overfilling of reserve pool Darrick J. Wong
2022-03-28 1:22 ` Dave Chinner [this message]
2022-04-06 16:42 ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 6/6] xfs: don't report reserved bnobt space as available Darrick J. Wong
2022-04-06 16:43 ` Christoph Hellwig
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=20220328012241.GU1544202@dread.disaster.area \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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