mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-04 07:48:36 +00:00
journal: completely rework the mmap cache as I too dumb to actually understand it
Instead of doing hand optimized fd bisect arrays just use plain old hashmaps. Now I can understand my own code again. Yay! As a side effect this should fix some bad memory accesses caused by accesses after mmap(), introduced in 189.
This commit is contained in:
+11
-2
@@ -2473,6 +2473,13 @@ test_journal_verify_LDADD = \
|
||||
libsystemd-journal-internal.la \
|
||||
libsystemd-id128-internal.la
|
||||
|
||||
test_mmap_cache_SOURCES = \
|
||||
src/journal/test-mmap-cache.c
|
||||
|
||||
test_mmap_cache_LDADD = \
|
||||
libsystemd-shared.la \
|
||||
libsystemd-journal-internal.la
|
||||
|
||||
libsystemd_journal_la_SOURCES = \
|
||||
src/journal/sd-journal.c \
|
||||
src/systemd/sd-journal.h \
|
||||
@@ -2577,13 +2584,15 @@ noinst_PROGRAMS += \
|
||||
test-journal-send \
|
||||
test-journal-match \
|
||||
test-journal-stream \
|
||||
test-journal-verify
|
||||
test-journal-verify \
|
||||
test-mmap-cache
|
||||
|
||||
TESTS += \
|
||||
test-journal \
|
||||
test-journal-match \
|
||||
test-journal-stream \
|
||||
test-journal-verify
|
||||
test-journal-verify \
|
||||
test-mmap-cache
|
||||
|
||||
pkginclude_HEADERS += \
|
||||
src/systemd/sd-journal.h \
|
||||
|
||||
@@ -19,6 +19,11 @@ F18:
|
||||
|
||||
Features:
|
||||
|
||||
* document that deps in [Unit] sections ignore Alias= fileds in
|
||||
[Install] units of other units, unless those units are disabled
|
||||
|
||||
* need to update LGPL2.1 text to newest version (with updated FSF address)
|
||||
|
||||
* allow users from "wheel" to start/stop services
|
||||
|
||||
* systemctl: when powering down/suspending check for inhibitors, and warn.
|
||||
|
||||
@@ -1829,7 +1829,6 @@ static int service_spawn(
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
|
||||
if ((r = unit_watch_pid(UNIT(s), pid)) < 0)
|
||||
/* FIXME: we need to do something here */
|
||||
goto fail;
|
||||
|
||||
+394
-525
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,8 @@
|
||||
***/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
typedef struct MMapCache MMapCache;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user