summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-12-16 20:32:34 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-12-18 11:53:39 +0100
commit0633cb5206924bb6fe183804eda2b696ae352cca (patch)
tree070d8bbd8ac6edf072331c81d5bf8358167fedcb /src/journal
parent14499361a537f769fadfb2e9323c8a65d31e6862 (diff)
Revert "journal: optimize iteration: skip files that cannot improve current candidate entry"
This reverts commit f8b5a3b75fb55f0acb85c21424b3893c822742e9. This optimization will be made redundant by the following patches.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/sd-journal.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index be08a92b76..15cc1fc49f 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -517,27 +517,6 @@ static bool whole_file_precedes_location(JournalFile *f, Location *l, direction_
return false;
}
-static bool file_may_have_preceding_entry(JournalFile *f, JournalFile *of, uint64_t op, direction_t direction) {
- Object *o;
- int r;
-
- assert(f);
- assert(of);
-
- r = journal_file_move_to_object(of, OBJECT_ENTRY, op, &o);
- if (r < 0)
- return true;
-
- if (sd_id128_equal(f->header->seqnum_id, of->header->seqnum_id))
- return direction == DIRECTION_DOWN ?
- le64toh(o->entry.seqnum) >= le64toh(f->header->head_entry_seqnum) :
- le64toh(o->entry.seqnum) <= le64toh(f->header->tail_entry_seqnum);
-
- return direction == DIRECTION_DOWN ?
- le64toh(o->entry.realtime) >= le64toh(f->header->head_entry_realtime) :
- le64toh(o->entry.realtime) <= le64toh(f->header->tail_entry_realtime);
-}
-
_pure_ static int compare_with_location(JournalFile *af, Object *ao, Location *l) {
uint64_t a;
@@ -926,9 +905,6 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
if (whole_file_precedes_location(f, &j->current_location, direction))
continue;
- if (new_file && !file_may_have_preceding_entry(f, new_file, new_offset, direction))
- continue;
-
r = next_beyond_location(j, f, direction, &o, &p);
if (r < 0) {
log_debug_errno(r, "Can't iterate through %s, ignoring: %m", f->path);