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

Goffredo Baroncelli kreijack at libero.it
Sat Mar 21 00:38:38 PDT 2015


On 2015-03-22 20:53, Zbigniew Jędrzejewski-Szmek wrote:
> On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
>> Hi Zbyszek,
>>
[...]
>>> 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.

Unfortunately the +C attributes has his downside, which cannot be ignored. All my work was due to the fact that the NOCOW attribute was set unconditionally. I proposed a patches set which adds an option to tune this behavior; Lennart asked to replace it with this "tmpfile.d" solution.

Frankly speaking, I think that it would be doable also to set the -C attributes by hand by the user/sysadmin[1]. My needing is only to avoid this *unconditionally* NOCOW attribute set, for these few cases (BTRFS w/RAID) where it could degrades the btrfs features ( without notifying the user !).

> 
> Zbyszek
> 

Goffredo

[1] It is needed only one time; after you set as +C the directory all the new files
inherits this attribute.  

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

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