<div dir="ltr"><div>Thanks for the reply Lennart.<br></div><div><br></div><div>1) mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 28, 0) = -1 EINVAL</div>> (Invalid argument) is the culprit for this error???<br>2) If YES. Is this JFFS2 MTD file system bug or<br>3) Is this not considered as systemd bug to support compatibility for such file system? Check first FS support writable mappings or not and if not then use other method to enable Persistence logging for systemd?<br><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 21, 2019 at 5:05 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Di, 21.05.19 16:45, Kay One (<a href="mailto:kayone007@gmail.com" target="_blank">kayone007@gmail.com</a>) wrote:<br>
<br>
> Hi Lennart,<br>
><br>
> Thanks for the reply.<br>
> JFFS2 is the file system being used in my case. Also, if I would delete<br>
> /var/log/journal directory then these errors are stopping.<br>
> Meaning while writing to persistence storage this error is persisting all<br>
> the time.<br>
><br>
> cat /proc/cmdline<br>
> console=ttyS0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2<br>
><br>
> df -Tk<br>
> Filesystem Type 1K-blocks Used Available Use% Mounted<br>
> on<br>
> /dev/root *jffs2* 81792 61220 20572 75% /<br>
> devtmpfs devtmpfs 506040 4 506036 0% /dev<br>
> tmpfs tmpfs 514744 4 514740 0% /dev/shm<br>
> tmpfs tmpfs 514744 13268 501476 3% /run<br>
> tmpfs tmpfs 514744 0 514744 0%<br>
> /sys/fs/cgroup<br>
> tmpfs tmpfs 514744 0 514744 0% /tmp<br>
> /dev/mtdblock1 *jffs2* 20416 6784 13632 33%<br>
> /home/root/apps<br>
> tmpfs tmpfs 102948 0 102948 0%<br>
> /run/user/0<br>
><br>
> Suspicious cause for this error:<br>
> ------------------------------------------<br>
><br>
><br>
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 28, 0) = -1 EINVAL<br>
> (Invalid argument)<br>
<br>
The journal requires a storage file system that supports writable<br>
memory mapping. Your's (jffs2) apparently does not, it's too limited<br>
for that.<br>
<br>
Maybe you can work with the kernel maintainers of that file system to<br>
add proper support for writbale mmap()?<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">1) </blockquote></div></div>