aboutsummaryrefslogtreecommitdiff
path: root/reftable/blocksource.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-09-03 09:15:02 -0700
committerJunio C Hamano <gitster@pobox.com>2024-09-03 09:15:03 -0700
commit17636cdf3b0bf344a2e3090fd8bf254cf3ec0a2f (patch)
treee3171d88382d6a79da84cd6135c4a23d71418d9b /reftable/blocksource.c
parentdd903659cd54d4e21ca41b0c1f5d10b66763eb60 (diff)
parent85da2a2ab62e24a8b9ff183fe3a451b445632487 (diff)
downloadgit-17636cdf3b0bf344a2e3090fd8bf254cf3ec0a2f.tar.xz
Merge branch 'ps/reftable-concurrent-compaction'
The code path for compacting reftable files saw some bugfixes against concurrent operation. * ps/reftable-concurrent-compaction: reftable/stack: fix segfault when reload with reused readers fails reftable/stack: reorder swapping in the reloaded stack contents reftable/reader: keep readers alive during iteration reftable/reader: introduce refcounting reftable/stack: fix broken refnames in `write_n_ref_tables()` reftable/reader: inline `reader_close()` reftable/reader: inline `init_reader()` reftable/reader: rename `reftable_new_reader()` reftable/stack: inline `stack_compact_range_stats()` reftable/blocksource: drop malloc block source
Diffstat (limited to 'reftable/blocksource.c')
-rw-r--r--reftable/blocksource.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/reftable/blocksource.c b/reftable/blocksource.c
index abce4bb2e1..e93cac9bb6 100644
--- a/reftable/blocksource.c
+++ b/reftable/blocksource.c
@@ -55,26 +55,6 @@ void block_source_from_strbuf(struct reftable_block_source *bs,
bs->arg = buf;
}
-static void malloc_return_block(void *b UNUSED, struct reftable_block *dest)
-{
- if (dest->len)
- memset(dest->data, 0xff, dest->len);
- reftable_free(dest->data);
-}
-
-static struct reftable_block_source_vtable malloc_vtable = {
- .return_block = &malloc_return_block,
-};
-
-static struct reftable_block_source malloc_block_source_instance = {
- .ops = &malloc_vtable,
-};
-
-struct reftable_block_source malloc_block_source(void)
-{
- return malloc_block_source_instance;
-}
-
struct file_block_source {
uint64_t size;
unsigned char *data;