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

Goffredo Baroncelli kreijack at libero.it
Mon Mar 9 16:01:03 PDT 2015


On 2015-03-08 15:34, Zbigniew Jędrzejewski-Szmek wrote:
> On Sun, Mar 08, 2015 at 12:48:27PM +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 corruputed journal.
>>
>> Signed-off-by: Goffredo Baroncelli <kreijack at inwind.it>
> Please drop the SOB.
> 
>> +# set the journal file as NOCOW; only valid for BTRFS filesystem
>> +h /var/log/journal/%m - - - - +C
> Shouldn't this be 'H'?

Hi,
if a directory is marked as +C, each *new* files inherited the NOCOW flag:

$ mkdir test
$ lsattr -d test/
---------------- test/
$ dd if=/dev/zero of=test/one bs=1M count=1
$ lsattr -a test
---------------- test/.
---------------- test/..
---------------- test/one
$ chattr +C test
$ dd if=/dev/zero of=test/two bs=1M count=1
$ lsattr -a test
---------------C test/.
---------------- test/..
---------------- test/one
---------------C test/two

> Zbyszek
> 
Goffredo


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