summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-12-16 20:32:41 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-12-18 11:53:39 +0100
commit8a2bd0a365b203a3c42de75d5c907a5c540fbb13 (patch)
treef425410624dbadff021d416aa1b534f07a21d130
parent0633cb5206924bb6fe183804eda2b696ae352cca (diff)
Revert "journal: optimize iteration: skip whole files behind current location"
This reverts commit b7c88ab8cc7d55a43450bf3dea750f95f2e910d6. This optimization will be made redundant by the following patches.
-rw-r--r--src/journal/sd-journal.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 15cc1fc49f..72c9770a99 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -497,26 +497,6 @@ static int compare_entry_order(JournalFile *af, Object *_ao,
return 0;
}
-static bool whole_file_precedes_location(JournalFile *f, Location *l, direction_t direction) {
- assert(f);
- assert(l);
-
- if (l->type != LOCATION_DISCRETE && l->type != LOCATION_SEEK)
- return false;
-
- if (l->seqnum_set && sd_id128_equal(l->seqnum_id, f->header->seqnum_id))
- return direction == DIRECTION_DOWN ?
- l->seqnum > le64toh(f->header->tail_entry_seqnum) :
- l->seqnum < le64toh(f->header->head_entry_seqnum);
-
- if (l->realtime_set)
- return direction == DIRECTION_DOWN ?
- l->realtime > le64toh(f->header->tail_entry_realtime) :
- l->realtime < le64toh(f->header->head_entry_realtime);
-
- return false;
-}
-
_pure_ static int compare_with_location(JournalFile *af, Object *ao, Location *l) {
uint64_t a;
@@ -902,9 +882,6 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
ORDERED_HASHMAP_FOREACH(f, j->files, i) {
bool found;
- if (whole_file_precedes_location(f, &j->current_location, 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);