| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "journal-file.h" /* IWYU pragma: export */ |
| 5 |
#include "shared-forward.h" |
| 6 |
|
| 7 |
int journal_file_set_offline(JournalFile *f, bool wait); |
| 8 |
bool journal_file_is_offlining(JournalFile *f); |
| 9 |
void journal_file_write_final_tag(JournalFile *f); |
| 10 |
JournalFile* journal_file_offline_close(JournalFile *f); |
| 11 |
DEFINE_TRIVIAL_CLEANUP_FUNC(JournalFile*, journal_file_offline_close); |
| 12 |
|
| 13 |
int journal_file_open_reliably( |
| 14 |
const char *fname, |
| 15 |
int open_flags, |
| 16 |
JournalFileFlags file_flags, |
| 17 |
mode_t mode, |
| 18 |
uint64_t compress_threshold_bytes, |
| 19 |
JournalMetrics *metrics, |
| 20 |
MMapCache *mmap_cache, |
| 21 |
JournalFile **ret); |
| 22 |
|
| 23 |
JournalFile* journal_file_initiate_close(JournalFile *f, Set *deferred_closes); |
| 24 |
int journal_file_rotate( |
| 25 |
JournalFile **f, |
| 26 |
MMapCache *mmap_cache, |
| 27 |
JournalFileFlags file_flags, |
| 28 |
uint64_t compress_threshold_bytes, |
| 29 |
Set *deferred_closes); |
| 30 |
|
| 31 |
extern const struct hash_ops journal_file_hash_ops_offline_close; |