[systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

Goffredo Baroncelli kreijack at libero.it
Fri Mar 20 11:06:28 PDT 2015

Hi Zbyszek,

On 2015-03-21 14:37, Zbigniew Jędrzejewski-Szmek wrote:
> On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
>> From: Goffredo Baroncelli <kreijack at inwind.it>
>> Add a new tmpfiles.d snippets to set the NOCOW attributes for the
>> journal files. This allow better perfomance when the root file system
>> is BTRFS. Pay attention that the NOCOW flags disables the checksum and
>> prevent scrub to rebuild a corrupted journal.
> I now merged patches 1-3/4, but not this one. Setting/unsetting
> attributes seems to be generally useful, so the rest stands on its
> own. The reason I held back with the last patch is that setting of the
> attributes through tmpfiles should be added together with the removal
> of the same functionality from journald. 

You are right, the patch #4 and the removal of the current code are coupled;
with the patch #1..#3 included, I will re-issue the #4 with another patch which reverts the code. And the discussion will restart.

> But there are some details to
> work out.
> Setting +C on /var/log/journal/%m has smaller scope than the code in
> journal-file.c now. For example it does not cover files opened by
> systemd-journal-remote. 

I am not familiar with s*d-journal-remote; from the man page it seems that the log are stored /by default) in /var/log/journal/remote/ ; if so it is sufficient to add a line like

+h /var/log/journal/remote - - - - +C

> Having the files no-cow is just as useful for those,
> but it's not entirely clear how to support it in the new scheme.
> Zbyszek
>> +# set the journal file as NOCOW; only valid for BTRFS filesystem
>> +h /var/log/journal/%m - - - - +C

gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

More information about the systemd-devel mailing list