From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs: streamline xfs_filestream_pick_ag
Date: Wed, 23 Oct 2024 07:08:33 +0200 [thread overview]
Message-ID: <20241023050833.GB1051@lst.de> (raw)
In-Reply-To: <20241022180535.GF21853@frogsfrogsfrogs>
On Tue, Oct 22, 2024 at 11:05:35AM -0700, Darrick J. Wong wrote:
> On Tue, Oct 22, 2024 at 02:13:37PM +0200, Christoph Hellwig wrote:
> > Directly return the error from xfs_bmap_longest_free_extent instead
> > of breaking from the loop and handling it there, and use a done
> > label to directly jump to the exist when we found a suitable perag
> > structure to reduce the indentation level and pag/max_pag check
> > complexity in the tail of the function.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> So the key change here is that now the function can exit directly from
> the for_each_perag_wrap loop if it finds a suitable perag, and that the
> rest of the function has less indentation?
Yes.
> Ok, sounds good to me though the bugfix probably should've come first.
I needed the refactor to understand the mess in the function :)
But I'll reorder it.
next prev parent reply other threads:[~2024-10-23 5:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 12:13 filestreams syzbot fix Christoph Hellwig
2024-10-22 12:13 ` [PATCH 1/2] xfs: streamline xfs_filestream_pick_ag Christoph Hellwig
2024-10-22 18:05 ` Darrick J. Wong
2024-10-23 5:08 ` Christoph Hellwig [this message]
2024-10-22 12:13 ` [PATCH 2/2] xfs: fix finding a last resort AG in xfs_filestream_pick_ag Christoph Hellwig
2024-10-22 17:59 ` Darrick J. Wong
2024-10-23 5:07 ` 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=20241023050833.GB1051@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--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