Re: [PATCH v4 02/13] pack-revindex: prepare for incremental MIDX bitmaps
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 19, 2025, 00:07 UTC
- Message-ID
- <Z9oK2XBF9plTBbnl@nand.local>
- In-Reply-To
- <Z9oJoZdfyA4eAbeD@nand.local>
On Tue, Mar 18, 2025 at 08:02:41PM -0400, Taylor Blau wrote:
Show 20 quoted lines
> > I understand why we need to account for the objects in the base to > > offset our total size. > > > > Similar to Patrick's comments on v3, I wondered about why we couldn't > > just modify bitmap_num_objects() here, and why some callers would be > > left with the other. > > > > I guess sometimes we still need to consider a single layer. We can't > > quite just access m->num_objects there, because we still need the midx > > vs pack abstraction layer. I just thought there'd be more discussion > > here, but it looks the same as v3. > > Right; some callers care about the number of objects in *their* layer, > like computing the size of some bitmap extensions, bounds-checking > pseudo-merge commit lookups, or generating positions for objects in the > extended index. > > I'm happy to include that discussion somewhere in the commit message or > as a comment nearby bitmap_non_extended_bits(), but I'm not sure which > is better. If you have thoughts, LMK.
I renamed this function to bitmap_num_objects_total(), which I think more clearly distinguishes it from bitmap_num_objects(). If you have other thoughts or things you think I should do in addition to that, LMK.
Thanks, Taylor