mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
sd-journal: drop unnecessary re-read of data object
Follow-up for ec50313d4e.
The function generic_array_bisect_plus_one() does not read any new data
objects, so the data object is still valid, and not necessary to re-read it.
This commit is contained in:
@@ -3541,7 +3541,7 @@ int journal_file_move_to_entry_by_monotonic_for_data(
|
||||
Object **ret_object,
|
||||
uint64_t *ret_offset) {
|
||||
|
||||
uint64_t b, z, entry_offset, entry_array_offset, n_entries;
|
||||
uint64_t z, entry_offset, entry_array_offset, n_entries;
|
||||
Object *o;
|
||||
int r;
|
||||
|
||||
@@ -3555,7 +3555,7 @@ int journal_file_move_to_entry_by_monotonic_for_data(
|
||||
n_entries = le64toh(READ_NOW(d->data.n_entries));
|
||||
|
||||
/* First, seek by time */
|
||||
r = find_data_object_by_boot_id(f, boot_id, &o, &b);
|
||||
r = find_data_object_by_boot_id(f, boot_id, &o, NULL);
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
@@ -3572,11 +3572,6 @@ int journal_file_move_to_entry_by_monotonic_for_data(
|
||||
|
||||
/* And now, continue seeking until we find an entry that
|
||||
* exists in both bisection arrays */
|
||||
|
||||
r = journal_file_move_to_object(f, OBJECT_DATA, b, &o);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
for (;;) {
|
||||
uint64_t p, q;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user