Re: [PATCH 3/8] midx-write.c: pass `start_pack` to `get_sorted_entries()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 23, 2024 at 12:38:09PM -0400, Taylor Blau wrote:
> The function `get_sorted_entries()` is broadly responsible for
> building an array of the objects to be written into a MIDX based on the
> provided list of packs.
> 
> If we have loaded an existing MIDX, however, we may not use all of its
> packs, despite loading them into the ctx->info array.
> 
> The existing implementation simply skips past the first
> ctx->m->num_packs (if ctx->m is non-NULL, indicating that we loaded an
> existing MIDX). Future changes (outside the scope of this patch series)
> to the MIDX code will require us to skip *at most* that number[^1].
> 
> We could tag each pack with a bit that indicates the pack's contents
> should be included in the MIDX. But we can just as easily determine the
> number of packs to skip by passing in the number of packs we learned
> about after processing an existing MIDX.

Will we always want to skip packs from the start of the array? Or may it
happen that we want to skip packs in the middle of it? It's a bit hard
to judge because there isn't a ton of context when exactly we'll want to
skip, and why.

Patrick

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux