From: Gao Xiang <hsiangkao@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH v3] xfs: get rid of unnecessary xfs_perag_{get,put} pairs
Date: Sat, 6 Jun 2020 02:30:37 +0800 [thread overview]
Message-ID: <20200605183037.GA4468@xiangao.remote.csb> (raw)
In-Reply-To: <20200605155604.GU2162697@magnolia>
On Fri, Jun 05, 2020 at 08:56:04AM -0700, Darrick J. Wong wrote:
> On Fri, Jun 05, 2020 at 04:52:00PM +0800, Gao Xiang wrote:
...
> > ---
> > changes since v2:
> > kill unneeded ASSERTs, leaving which first brought
> > into a context pointed out by Dave (including callback
> > entrances).
...
> >
> > @@ -3006,7 +2999,8 @@ xfs_alloc_read_agf(
> > ASSERT(!(*bpp)->b_error);
> >
> > agf = (*bpp)->b_addr;
> > - pag = xfs_perag_get(mp, agno);
> > + pag = (*bpp)->b_pag;
> > + ASSERT(pag->pag_agno == agno);
>
> I thought these assertions were all dropped in v3?
The ASSERT above is in xfs_alloc_read_agf. If I didn't misread what Dave
said, I think this is necessary at least.
>
> Alternately-- if you want to sanity check that b_pag and the buffer
> belong to the same ag, why not do that in xfs_buf_find for all the
> buffers?
Since that modification doesn't relate to this patch though (since
the purpose of this patch is not add ASSERT to xfs_buf_find).
If in that way, I think we can just kill all these ASSERTs.
>
> > ASSERT(ptr->s != 0);
> > + ASSERT(pag->pag_agno == be32_to_cpu(agf->agf_seqno));
>
> I still see a few of these after-the-fact agno checks throughout the patch.
what I wrote above is:
> > into a context pointed out by Dave (including callback
> > entrances).
I can leave these xfs_alloc_read_agf, xfs_ialloc_read_agi 2 assertions only
if you want.
Thanks,
Gao Xiang
>
> --D
>
next prev parent reply other threads:[~2020-06-05 18:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 14:52 [PATCH] xfs: get rid of unnecessary xfs_perag_{get,put} pairs Gao Xiang
2020-06-03 0:22 ` Darrick J. Wong
2020-06-03 0:44 ` Dave Chinner
2020-06-03 0:48 ` Darrick J. Wong
2020-06-03 0:49 ` Gao Xiang
2020-06-03 1:27 ` Dave Chinner
2020-06-03 1:40 ` Gao Xiang
2020-06-03 3:02 ` Dave Chinner
2020-06-03 3:19 ` Gao Xiang
2020-06-03 12:11 ` [PATCH v2] " Gao Xiang
2020-06-04 21:59 ` Dave Chinner
2020-06-05 1:44 ` Gao Xiang
2020-06-05 8:52 ` [PATCH v3] " Gao Xiang
2020-06-05 15:56 ` Darrick J. Wong
2020-06-05 18:30 ` Gao Xiang [this message]
2020-06-05 18:47 ` Gao Xiang
2020-06-23 10:08 ` Gao Xiang
2020-07-13 8:53 ` [PATCH v4] " Gao Xiang
2020-07-13 16:12 ` Darrick J. Wong
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=20200605183037.GA4468@xiangao.remote.csb \
--to=hsiangkao@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=dchinner@redhat.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;
as well as URLs for NNTP newsgroup(s).