From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: drop all altpath buffers at the end of the sibling check
Date: Wed, 25 Mar 2020 16:04:27 +1100 [thread overview]
Message-ID: <20200325050427.GH10776@dread.disaster.area> (raw)
In-Reply-To: <158510668935.922633.2938909097570009707.stgit@magnolia>
On Tue, Mar 24, 2020 at 08:24:49PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The dirattr btree checking code uses the altpath substructure of the
> dirattr state structure to check the sibling pointers of dir/attr tree
> blocks. At the end of sibling checks, xfs_da3_path_shift could have
> changed multiple levels of buffer pointers in the altpath structure.
> Although we release the leaf level buffer, this isn't enough -- we also
> need to release the node buffers that are unique to the altpath.
>
> Not releasing all of the altpath buffers leaves them locked to the
> transaction. This is suboptimal because we should release resources
> when we don't need them anymore. Fix the function to loop all levels of
> the altpath, and fix the return logic so that we always run the loop.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/scrub/dabtree.c | 42 +++++++++++++++++++++++++-----------------
> 1 file changed, 25 insertions(+), 17 deletions(-)
looks reasonable.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-03-25 5:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 3:24 [PATCH 0/4] xfs: random fixes Darrick J. Wong
2020-03-25 3:24 ` [PATCH 1/4] xfs: prohibit fs freezing when using empty transactions Darrick J. Wong
2020-03-25 4:53 ` Dave Chinner
2020-03-25 5:56 ` Darrick J. Wong
2020-03-25 6:06 ` [PATCH v2 " Darrick J. Wong
2020-03-25 23:26 ` Dave Chinner
2020-04-01 11:22 ` [PATCH " Chandan Rajendra
2020-03-25 3:24 ` [PATCH 2/4] xfs: validate the realtime geometry in xfs_validate_sb_common Darrick J. Wong
2020-03-25 5:00 ` Dave Chinner
2020-03-25 5:53 ` Darrick J. Wong
2020-03-25 6:07 ` [PATCH v2 " Darrick J. Wong
2020-03-25 23:27 ` Dave Chinner
2020-04-01 13:49 ` [PATCH " Chandan Rajendra
2020-03-25 3:24 ` [PATCH 3/4] xfs: drop all altpath buffers at the end of the sibling check Darrick J. Wong
2020-03-25 5:04 ` Dave Chinner [this message]
2020-04-02 3:05 ` Chandan Rajendra
2020-03-25 3:24 ` [PATCH 4/4] xfs: directory bestfree check should release buffers Darrick J. Wong
2020-03-25 5:05 ` Dave Chinner
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=20200325050427.GH10776@dread.disaster.area \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--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