]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: when sending huge log messages prefer memfds over temporary files in /dev/shm
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Oct 2014 16:36:02 +0000 (17:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Oct 2014 16:36:02 +0000 (17:36 +0100)
commitc79e98eadd3056a36a662699fa650db5b1bca0c3
tree456bcce009973aafa5269f62a4e04f34c339f5e6
parentdd4540da0e1f983540d862cc657df7161a3bdd06
journal: when sending huge log messages prefer memfds over temporary files in /dev/shm

Previously when a log message grew beyond the maximum AF_UNIX/SOCK_DGRAM
datagram limit we'd send an fd to a deleted file in /dev/shm instead.
Because the sender could still modify the file after delivery we had to
immediately copy the data on the receiving side.

With memfds we can optimize this logic, and also remove the dependency
on /dev/shm: simply send a sealed memfd around, and if we detect the
seal memory map the fd and use it directly.
src/journal/journal-send.c
src/journal/journald-native.c