metrics,
s->mmap,
s->deferred_closes,
- NULL,
+ /* template= */ NULL,
&f);
else
r = managed_journal_file_open(
- -1,
+ /* fd= */ -1,
fname,
open_flags,
file_flags,
metrics,
s->mmap,
s->deferred_closes,
- NULL,
+ /* template= */ NULL,
&f);
-
if (r < 0)
return r;
(void) mkdir(s->system_storage.path, 0755);
fn = strjoina(s->system_storage.path, "/system.journal");
- r = open_journal(s, true, fn, O_RDWR|O_CREAT, s->seal, &s->system_storage.metrics, &s->system_journal);
+ r = open_journal(
+ s,
+ /* reliably= */ true,
+ fn,
+ O_RDWR|O_CREAT,
+ s->seal,
+ &s->system_storage.metrics,
+ &s->system_journal);
if (r >= 0) {
server_add_acls(s->system_journal, 0);
(void) cache_space_refresh(s, &s->system_storage);
if (s->system_journal && !relinquish_requested) {
- /* Try to open the runtime journal, but only
- * if it already exists, so that we can flush
- * it into the system journal */
-
- r = open_journal(s, false, fn, O_RDWR, false, &s->runtime_storage.metrics, &s->runtime_journal);
+ /* Try to open the runtime journal, but only if it already exists, so that we can
+ * flush it into the system journal */
+
+ r = open_journal(
+ s,
+ /* reliably= */ false,
+ fn,
+ O_RDWR,
+ /* seal= */ false,
+ &s->runtime_storage.metrics,
+ &s->runtime_journal);
if (r < 0) {
if (r != -ENOENT)
log_ratelimit_warning_errno(r, JOURNAL_LOG_RATELIMIT,
(void) mkdir_parents(s->runtime_storage.path, 0755);
(void) mkdir(s->runtime_storage.path, 0750);
- r = open_journal(s, true, fn, O_RDWR|O_CREAT, false, &s->runtime_storage.metrics, &s->runtime_journal);
+ r = open_journal(
+ s,
+ /* reliably= */ true,
+ fn,
+ O_RDWR|O_CREAT,
+ /* seal= */ false,
+ &s->runtime_storage.metrics,
+ &s->runtime_journal);
if (r < 0)
return log_ratelimit_warning_errno(r, JOURNAL_LOG_RATELIMIT,
"Failed to open runtime journal: %m");
(void) managed_journal_file_close(first);
}
- r = open_journal(s, true, p, O_RDWR|O_CREAT, s->seal, &s->system_storage.metrics, &f);
+ r = open_journal(
+ s,
+ /* reliably= */ true,
+ p,
+ O_RDWR|O_CREAT,
+ s->seal,
+ &s->system_storage.metrics,
+ &f);
if (r < 0)
return r;
&s->system_storage.metrics,
s->mmap,
s->deferred_closes,
- NULL,
+ /* template= */ NULL,
&f);
if (r < 0) {
log_ratelimit_warning_errno(r, JOURNAL_LOG_RATELIMIT,