]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal-file: don't use pread() when determining where to append, use mmap as before 22350/head
authorLennart Poettering <lennart@poettering.net>
Tue, 1 Feb 2022 17:45:35 +0000 (18:45 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Feb 2022 02:21:44 +0000 (11:21 +0900)
commite6d4a1106c613cbaa50320782889d002d8c1a58d
treedfce994e1ad466de2aae1cc45a44d54d3f381196
parente5d8473335ee399b12d803288fcc09d4bd3b120b
journal-file: don't use pread() when determining where to append, use mmap as before

This partially undoes the effect of
ab6e257b3e4e5b95f3750ed019bed6e89989e41b.

Originally, we always used the mmap logic to determine the current end
of the file. ab6e257b3e4e5b95f3750ed019bed6e89989e41b changed this so
that we always used pread().

With this change we'll use pread() from the synchronization thread and
mmap otherwise.
src/journal/journald-file.c
src/libsystemd/sd-journal/journal-file.c
src/libsystemd/sd-journal/journal-file.h