Re: [PATCH] reftable/stack: use geometric table compaction

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

 



On 24/03/06 01:37PM, Patrick Steinhardt wrote:
> On Tue, Mar 05, 2024 at 08:03:45PM +0000, Justin Tobler via GitGitGadget wrote:
> > From: Justin Tobler <jltobler@xxxxxxxxx>
> > @@ -1305,7 +1287,7 @@ int reftable_stack_auto_compact(struct reftable_stack *st)
> >  		suggest_compaction_segment(sizes, st->merged->stack_len);
> >  	reftable_free(sizes);
> >  	if (segment_size(&seg) > 0)
> > -		return stack_compact_range_stats(st, seg.start, seg.end - 1,
> > +		return stack_compact_range_stats(st, seg.start, seg.end,
> >  						 NULL);
> >  
> >  	return 0;
> 
> One more thing: I think it would make sense to move the refactoring
> where you change whether the end segment index is inclusive or exclusive
> into a separate patch so that it's easier to reason about. Also, the
> fact that no tests would require changes would further stress the point
> that this is a mere refactoring without unintended side effects.

The `test_suggest_compaction_segment()` in `stack_test.c` does have to
be updated to reflect the segment end now being inclusive. But other
than that, no tests have to be updated.

Thanks Patrick for all the great feedback! I've updated per your
comments in V2 of the patch series.

-Justin




[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