• Igor Zhbanov's avatar
    [systemd] journald: Retry if posix_fallocate returned -1 (EINTR). Fixes JB#53998 · 2a57f15f
    Igor Zhbanov authored
    Backport upstream commit 4c54768c9732532f4e56eab1be3e5474769e0d7a.
    
    On some conditions (particularly when mobile CPUs are going to sleep),
    the posix_fallocate(), which is called when a new journal file is allocated,
    can return -1 (EINTR). This is counted as a fatal error. So the journald
    closes both old and journals, and simply throwing away further incoming
    events, because of no log files open.
    
    Introduce posix_fallocate_loop() that restarts the function in the case
    of EINTR. Also let's make code base more uniform by returning negative
    values on error.
    
    Fix assert in test-sigbus.c that incorrectly counted positive values as
    success. After changing the function return values, that will actually work.
    
    Rediff rpm/systemd-238_fix_build_with_glibc228.patch to fix line offsets.
    Signed-off-by: default avatarIgor Zhbanov <i.zhbanov@omp.ru>
    2a57f15f
Name
Last commit
Last update
rpm Loading commit data...
systemd @ 738ab750 Loading commit data...
.gitmodules Loading commit data...