On Wed, Apr 04, 2018 at 04:49:29PM +0200, Lennart Poettering wrote: > On Di, 03.04.18 14:10, vcaputo at pengaru.com (vcaputo at pengaru.com) wrote: > > > Back when I worked on making fsync() in journald asynchronous, I > > preserved the existing strategy of ignoring fsync() errors. > > > > In reading [1], I am reminded of this situation and am again wondering > > why this is the case. Shouldn't journald trigger a journal rotate when > > fsync() realizes an IO error, marking the previous journal as corrupt? > > > > Can someone remind me of the rationale behind the existing approach? > > Hmm, you are right, we should rotate if fsync() fails, indeed. > > Would love to review/merge a patch for that. > Slapped this [1] together today. I did not scrutinize the higher-order functions to verify they Do The Right Thing when the -EIO propagates out, but considering mmap_cache_got_sigbus() already produced -EIO, I assume things work. As mentioned in the PR, this is 100% untested. But I should be able to make time to iterate on the PR if it's desirable and review requires some changes. Regards, Vito Caputo [1] https://github.com/systemd/systemd/pull/8654