daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1abbee
From e1d77a906fef76c1c8db2132e1d3a407f913444c Mon Sep 17 00:00:00 2001
1abbee
From: Klearchos Chaloulos <klearchos.chaloulos@nokia.com>
1abbee
Date: Tue, 9 Feb 2016 12:14:54 +0200
1abbee
Subject: [PATCH] journal: Drop monotonicity check when appending to journal
1abbee
 file
1abbee
1abbee
Remove the check that triggers rotation of the journal file when the
1abbee
arriving log entry had a monotonic timestamp smaller that the previous
1abbee
log entry. This check causes unnecessary rotations when journal-remote
1abbee
was receiving from multiple senders, therefore monotonicity can not be
1abbee
guaranteed. Also, it does not offer any useful functionality for
1abbee
systemd-journald.
1abbee
1abbee
Cherry-picked from: ecb6105a1bd8445a123343827d46bb527bcca92f
1abbee
Related: #1318994
1abbee
---
1abbee
 src/journal/journal-file.c | 4 ----
1abbee
 1 file changed, 4 deletions(-)
1abbee
1abbee
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
c62b8e
index 2a93460d4e..8034b771de 100644
1abbee
--- a/src/journal/journal-file.c
1abbee
+++ b/src/journal/journal-file.c
1abbee
@@ -1419,10 +1419,6 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
1abbee
                 ts = &_ts;
1abbee
         }
1abbee
 
1abbee
-        if (f->tail_entry_monotonic_valid &&
1abbee
-            ts->monotonic < le64toh(f->header->tail_entry_monotonic))
1abbee
-                return -EINVAL;
1abbee
-
1abbee
 #ifdef HAVE_GCRYPT
1abbee
         r = journal_file_maybe_append_tag(f, ts->realtime);
1abbee
         if (r < 0)