chiark / gitweb /
journal: keep per-JournalFile location info during iteration
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 16 Dec 2014 20:03:36 +0000 (21:03 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 18 Dec 2014 11:17:20 +0000 (12:17 +0100)
commit6573ef05a3cbe15949acfbbf1ad03726068907bd
treecb3d38ce419ba37de77b8cb358e82883573d8e22
parent1fc605b0e130149a44abfa38c33f4535cfe548ea
journal: keep per-JournalFile location info during iteration

In next_beyond_location() when we find a candidate entry in a journal
file, save its location information in struct JournalFile.

The purpose of remembering the locations of candidate entries is to be
able to save work in the next iteration. This patch does only the
remembering part.

LOCATION_SEEK means the location identifies a candidate entry.
When a winner is picked from among candidates, it becomes
LOCATION_DISCRETE.
LOCATION_TAIL here signifies we've iterated the file to the end (or the
beginning in the case of reversed direction).
src/journal/journal-file.c
src/journal/journal-file.h
src/journal/sd-journal.c