describe: fix --no-exact-match
[git/debian.git] / reftable / stack.h
blobf57005846e561272054883e856d7a1dd14863a19
1 /*
2 Copyright 2020 Google LLC
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file or at
6 https://developers.google.com/open-source/licenses/bsd
7 */
9 #ifndef STACK_H
10 #define STACK_H
12 #include "system.h"
13 #include "reftable-writer.h"
14 #include "reftable-stack.h"
16 struct reftable_stack {
17 char *list_file;
18 char *reftable_dir;
19 int disable_auto_compact;
21 struct reftable_write_options config;
23 struct reftable_reader **readers;
24 size_t readers_len;
25 struct reftable_merged_table *merged;
26 struct reftable_compaction_stats stats;
29 int read_lines(const char *filename, char ***lines);
31 struct segment {
32 int start, end;
33 int log;
34 uint64_t bytes;
37 int fastlog2(uint64_t sz);
38 struct segment *sizes_to_segments(int *seglen, uint64_t *sizes, int n);
39 struct segment suggest_compaction_segment(uint64_t *sizes, int n);
41 #endif