[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
Sun Mar 22 12:53:13 PDT 2015


On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
> 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

That's the problem: current functionality works no matter where you
store the files, but it's hard to provide the same level of
flexibility with the tmpfiles-based solution.

Zbyszek


More information about the systemd-devel mailing list