git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 00/10] odb: make consistency checks pluggable

From
Karthik Nayak <karthik.188@gmail.com>
Date
Aug 31, 2026, 09:26 UTC
Message-ID
<CAOLa=ZSi1TiTZ=i=SQp+pmjTOm2_wY-NiCotx66+M6VDKx=ZXg@mail.gmail.com>
In-Reply-To
<20260831-pks-odb-source-fsck-v2-0-f9b16ef4957b@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 97 quoted lines
> Hi,
>
> this patch series makes object database consistency checks pluggable.
>
> This series is built on top of 2c3adbb2c4 (The 18th batch, 2026-08-24)
> with the following two dependencsie merged into it:
>
>   - ps/odb-eagerly-load-alternates at 0076dc9f81 (odb: drop
>     `alternates_db` field, 2026-08-17)
>
>   - ps/odb-pluggable-pack-generation at 5176dd3d05 (bundle: generate
>     packfiles via the object database, 2026-08-21)
>
> Changes in v2:
>   - Some commit message improvements.
>   - Link to v1: https://patch.msgid.link/20260825-pks-odb-source-fsck-v1-0-b756de0bf24f@pks.im
>
> Thanks!
>
> Patrick
>
> ---
> Patrick Steinhardt (10):
>       builtin/fsck: use `fsck_obj_buffer()` when checking loose objects
>       builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`
>       builtin/fsck: de-globalize option handling
>       builtin/fsck: don't check alternates with "--no-full"
>       odb: provide infrastructure for pluggable fsck checks
>       builtin/fsck: move packfile verification into the packed source
>       builtin/fsck: move reverse index verification into the packed source
>       builtin/fsck: move bitmap verification into the packed source
>       builtin/fsck: move multi-pack index verification into the packed source
>       builtin/fsck: move loose object verification into the loose source
>
>  builtin/fsck.c                | 296 ++++++++----------------------------------
>  odb.c                         |   9 ++
>  odb.h                         |  33 +++++
>  odb/source-files.c            |  13 ++
>  odb/source-inmemory.c         |   8 ++
>  odb/source-loose.c            |  92 +++++++++++++
>  odb/source-packed.c           | 117 +++++++++++++++++
>  odb/source.h                  |  21 +++
>  pack-bitmap.c                 |  26 ++--
>  pack-bitmap.h                 |   2 +-
>  t/t1450-fsck.sh               |   5 +
>  t/t5319-multi-pack-index.sh   |  13 ++
>  t/t5325-reverse-index.sh      |   8 ++
>  t/t5326-multi-pack-bitmaps.sh |  10 +-
>  14 files changed, 394 insertions(+), 259 deletions(-)
>
> Range-diff versus v1:
>
>  1:  cf49376600 !  1:  1aec903546 builtin/fsck: use `fsck_obj_buffer()` when checking loose objects
>     @@ Commit message
>
>          When checking loose objects we manually parse the object buffer we have
>          read from the on-disk file, mark the object and then call `fsck_obj()`.
>     -    Almost the exact same steps are also performed by `fsck_obj_buffer()`.
>     +    The exact same steps are also performed by `fsck_obj_buffer()`.
>
>          Stop open-coding this logic and call `fsck_obj_buffer()` instead.
>
>  2:  da2ca27041 !  2:  3804f0339e builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`
>     @@ Commit message
>          Furthermore, `fsck_obj()` has no callers other than `fsck_obj_buffer()`.
>
>          Refactor the code by merging those two functions. This makes it obvious
>     -    which function does what, and it allows us to get rid of the early in
>     -    `fsck_obj()` in case `SEEN` is set as the only caller unconditionally
>     -    clears that bit before calling it anyway.
>     +    which function does what, and it allows us to get rid of the early
>     +    return in `fsck_obj()` in case `SEEN` is set as the only caller
>     +    unconditionally clears that bit before calling it anyway.
>
>          Signed-off-by: Patrick Steinhardt <ps@pks.im>
>
>  3:  a24506f55e =  3:  b2cb9032cf builtin/fsck: de-globalize option handling
>  4:  f6a407efd0 =  4:  10ee3b8baf builtin/fsck: don't check alternates with "--no-full"
>  5:  31841a1f05 =  5:  1e65eec60e odb: provide infrastructure for pluggable fsck checks
>  6:  2cd6d71983 =  6:  0b8cf751aa builtin/fsck: move packfile verification into the packed source
>  7:  c0559f1820 =  7:  3a38a75549 builtin/fsck: move reverse index verification into the packed source
>  8:  96ae1ce3c6 !  8:  dd3a4c6cea builtin/fsck: move bitmap verification into the packed source
>     @@ Commit message
>          instead use the generic `ERROR_OBJECT` bit.
>
>          Note that this change also adapts `verify_bitmap_files()` to be
>     -    focussed on a single "packed" source instead of verifying bitmaps from
>     +    focused on a single "packed" source instead of verifying bitmaps from
>          all sources. This change is required as we already know to loop around
>          the sources in `odb_fsck()` itself.
>
>  9:  4721f4b4ba =  9:  90ada56b7f builtin/fsck: move multi-pack index verification into the packed source
> 10:  0b36829fd9 = 10:  b0f6fccae8 builtin/fsck: move loose object verification into the loose source
>
> ---
> base-commit: 6b08999fb1b3ad0bad04d492dc206ad42839e274
> change-id: 20260810-pks-odb-source-fsck-e64772c7ee5f
The changes here look good to me, thanks!
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 43 of 54 in “odb: make consistency checks pluggable”
  1. 00/10 odb: make consistency checks pluggablePatrick Steinhardt, Aug 25, 2026
  2. 01/10 builtin/fsck: use `fsck_obj_buffer()` when checking loose objectsPatrick Steinhardt, Aug 25, 2026
  3. Karthik NayakAug 27, 2026
  4. Patrick SteinhardtAug 31, 2026
  5. 02/10 builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`Patrick Steinhardt, Aug 25, 2026
  6. Karthik NayakAug 27, 2026
  7. Patrick SteinhardtAug 31, 2026
  8. 03/10 builtin/fsck: de-globalize option handlingPatrick Steinhardt, Aug 25, 2026
  9. Karthik NayakAug 27, 2026
  10. 04/10 builtin/fsck: don't check alternates with "--no-full"Patrick Steinhardt, Aug 25, 2026
  11. Karthik NayakAug 27, 2026
  12. Patrick SteinhardtAug 31, 2026
  13. 05/10 odb: provide infrastructure for pluggable fsck checksPatrick Steinhardt, Aug 25, 2026
  14. Karthik NayakAug 27, 2026
  15. Patrick SteinhardtAug 31, 2026
  16. 06/10 builtin/fsck: move packfile verification into the packed sourcePatrick Steinhardt, Aug 25, 2026
  17. 07/10 builtin/fsck: move reverse index verification into the packed sourcePatrick Steinhardt, Aug 25, 2026
  18. 08/10 builtin/fsck: move bitmap verification into the packed sourcePatrick Steinhardt, Aug 25, 2026
  19. Karthik NayakAug 27, 2026
  20. Patrick SteinhardtAug 31, 2026
  21. Karthik NayakAug 31, 2026
  22. 09/10 builtin/fsck: move multi-pack index verification into the packed sourcePatrick Steinhardt, Aug 25, 2026
  23. 10/10 builtin/fsck: move loose object verification into the loose sourcePatrick Steinhardt, Aug 25, 2026
  24. Karthik NayakAug 27, 2026
  25. 00/10 odb: make consistency checks pluggablePatrick Steinhardt, Aug 31, 2026
  26. 01/10 builtin/fsck: use `fsck_obj_buffer()` when checking loose objectsPatrick Steinhardt, Aug 31, 2026
  27. 02/10 builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`Patrick Steinhardt, Aug 31, 2026
  28. 03/10 builtin/fsck: de-globalize option handlingPatrick Steinhardt, Aug 31, 2026
  29. 04/10 builtin/fsck: don't check alternates with "--no-full"Patrick Steinhardt, Aug 31, 2026
  30. 05/10 odb: provide infrastructure for pluggable fsck checksPatrick Steinhardt, Aug 31, 2026
  31. Toon ClaesSep 11, 2026
  32. Patrick SteinhardtSep 11, 2026
  33. 06/10 builtin/fsck: move packfile verification into the packed sourcePatrick Steinhardt, Aug 31, 2026
  34. 07/10 builtin/fsck: move reverse index verification into the packed sourcePatrick Steinhardt, Aug 31, 2026
  35. Toon ClaesSep 11, 2026
  36. 08/10 builtin/fsck: move bitmap verification into the packed sourcePatrick Steinhardt, Aug 31, 2026
  37. 09/10 builtin/fsck: move multi-pack index verification into the packed sourcePatrick Steinhardt, Aug 31, 2026
  38. Toon ClaesSep 11, 2026
  39. Patrick SteinhardtSep 11, 2026
  40. 10/10 builtin/fsck: move loose object verification into the loose sourcePatrick Steinhardt, Aug 31, 2026
  41. Toon ClaesSep 11, 2026
  42. Patrick SteinhardtSep 11, 2026
  43. Karthik NayakAug 31, 2026
  44. 00/10 odb: make consistency checks pluggablePatrick Steinhardt, Sep 11, 2026
  45. 01/10 builtin/fsck: use `fsck_obj_buffer()` when checking loose objectsPatrick Steinhardt, Sep 11, 2026
  46. 02/10 builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`Patrick Steinhardt, Sep 11, 2026
  47. 03/10 builtin/fsck: de-globalize option handlingPatrick Steinhardt, Sep 11, 2026
  48. 04/10 builtin/fsck: don't check alternates with "--no-full"Patrick Steinhardt, Sep 11, 2026
  49. 05/10 odb: provide infrastructure for pluggable fsck checksPatrick Steinhardt, Sep 11, 2026
  50. 06/10 builtin/fsck: move packfile verification into the packed sourcePatrick Steinhardt, Sep 11, 2026
  51. 07/10 builtin/fsck: move reverse index verification into the packed sourcePatrick Steinhardt, Sep 11, 2026
  52. 08/10 builtin/fsck: move bitmap verification into the packed sourcePatrick Steinhardt, Sep 11, 2026
  53. 09/10 builtin/fsck: move multi-pack index verification into the packed sourcePatrick Steinhardt, Sep 11, 2026
  54. 10/10 builtin/fsck: move loose object verification into the loose sourcePatrick Steinhardt, Sep 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.