Re: [PATCH 10/11] reftable: make the compaction factor configurable

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

 



On Fri, May 10, 2024 at 04:55:10AM -0500, Karthik Nayak wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
[snip]
> > diff --git a/reftable/stack.c b/reftable/stack.c
> > index 7b4fff7c9e..6b0f8e13e7 100644
> > --- a/reftable/stack.c
> > +++ b/reftable/stack.c
> > @@ -1215,12 +1215,16 @@ static int segment_size(struct segment *s)
> >  	return s->end - s->start;
> >  }
> >
> > -struct segment suggest_compaction_segment(uint64_t *sizes, size_t n)
> > +struct segment suggest_compaction_segment(uint64_t *sizes, size_t n,
> > +					  uint8_t factor)
> >  {
> >  	struct segment seg = { 0 };
> >  	uint64_t bytes;
> >  	size_t i;
> >
> > +	if (!factor)
> > +		factor = 2;
> > +
> 
> This should probably go in reftable/constants.h

Good idea, will do.

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