]> git.ipfire.org Git - thirdparty/git.git/blame - reftable/stack.h
Merge branch 'rs/parse-options-with-keep-unknown-abbrev-fix'
[thirdparty/git.git] / reftable / stack.h
CommitLineData
e48d4272
HWN
1/*
2Copyright 2020 Google LLC
3
4Use of this source code is governed by a BSD-style
5license that can be found in the LICENSE file or at
6https://developers.google.com/open-source/licenses/bsd
7*/
8
9#ifndef STACK_H
10#define STACK_H
11
12#include "system.h"
13#include "reftable-writer.h"
14#include "reftable-stack.h"
15
16struct reftable_stack {
4f36b859 17 struct stat list_st;
e48d4272 18 char *list_file;
4f36b859
PS
19 int list_fd;
20
e48d4272
HWN
21 char *reftable_dir;
22 int disable_auto_compact;
23
24 struct reftable_write_options config;
25
26 struct reftable_reader **readers;
27 size_t readers_len;
28 struct reftable_merged_table *merged;
29 struct reftable_compaction_stats stats;
30};
31
32int read_lines(const char *filename, char ***lines);
33
34struct segment {
35 int start, end;
36 int log;
37 uint64_t bytes;
38};
39
40int fastlog2(uint64_t sz);
41struct segment *sizes_to_segments(int *seglen, uint64_t *sizes, int n);
42struct segment suggest_compaction_segment(uint64_t *sizes, int n);
43
44#endif