From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH] fsck: do not loop infinitely when processing packs
Date: Mon, 23 Feb 2026 10:36:25 +0100 [thread overview]
Message-ID: <aZwfmXG113t6OsUH@pks.im> (raw)
In-Reply-To: <20260223092523.GA209277@coredump.intra.peff.net>
On Mon, Feb 23, 2026 at 04:25:23AM -0500, Jeff King wrote:
> On Mon, Feb 23, 2026 at 09:46:00AM +0100, Patrick Steinhardt wrote:
>
> > As pointed out in [1] the root cause is actually something different,
> > and we merely expose this now with the MRU-based iteration. But I
> > wouldn't mind if we eventually switched back to maintaining two lists,
> > or finding a different way for how to maintain the iteration order.
>
> Maybe I don't understand what you're saying, but isn't the root cause
> the same?
>
> Code is iterating the list, and then during that iteration calls
> find_pack_entry(). The fact that fsck only calls find_pack_entry() in
> some subset of cases is immaterial, I'd think. The risk is always there
> when iterating now.
It is, true. All I'm saying is that the problem runs a bit deeper, and
that fixing the actual root cause would also fix the issue reported by
brian.
So we might want to have another look at hardening packfile iteration
either by reinstating the second list for iteration or by extending
`repo_for_each_pack()` to also set the `skip_updating_mru` bit. Over
time though I'd rather get rid of `repo_for_each_pack()`, and once that
is the case and packed object iteration is neatly encapsulated in the
backend the risk of only having the MRU will be significantly reduced.
Thanks!
Patrick
next prev parent reply other threads:[~2026-02-23 9:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-22 18:37 [PATCH] fsck: do not loop infinitely when processing packs brian m. carlson
2026-02-22 22:39 ` Junio C Hamano
2026-02-22 23:07 ` brian m. carlson
2026-02-23 7:12 ` Jeff King
2026-02-23 8:46 ` Patrick Steinhardt
2026-02-23 9:25 ` Jeff King
2026-02-23 9:36 ` Patrick Steinhardt [this message]
2026-02-23 9:46 ` Jeff King
2026-02-23 15:49 ` Junio C Hamano
2026-02-23 8:43 ` Patrick Steinhardt
2026-02-23 9:27 ` Jeff King
2026-02-23 9:53 ` Patrick Steinhardt
2026-02-24 22:23 ` brian m. carlson
2026-02-24 22:32 ` Junio C Hamano
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=aZwfmXG113t6OsUH@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
/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