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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Mar 21 06:37:31 PDT 2015


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. 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. 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


More information about the systemd-devel mailing list