Re: [systemd-devel] [RFC][PATCH] Add option to enable COW for journal file
On Thu, 05.03.15 21:39, Goffredo Baroncelli (kreij...@libero.it) wrote: Hi All, the enclosed patches add an option to the journald.conf file to allow a COW behavior for the journal files. The commit 11689d2a force the NOCOW flag of the journal files. This was needed because systemd-journald has very poor performance when the filesytem is BTRFS due to its the COW behavior. However removing the COW behavior, the journal file also lost the btrfs checksum protection, and this disables the BTRFS capability to rebuild a corrupted file [1] in a RAID filesystem. So this limits one of the biggest benefit of BTRFS. This patch adds the option CowJournal to the journald.conf to disable/enable the NOCOW flag for the journal file, allowing to revert to the old behavior. These patches are tagged as RFC, because I am not sure about the naming of the option (now CowJournal). I ask some feedback. I am pretty strongly against adding an explicit option for this. I consider this all a temporary stopgap, until btrfs's autodefrag makes the problem go away, and I am very conservative with adding new config options where it is already clear that they will eventually be useless. What I'd be open to is: a) beef up the tmpfiles logic to be able to do the equivalent of /usr/bin/chattr on files. (By adding a new line type, make h or so). b) remove all code that sets NOCOW explicitly on journal files from journald. c) instead ship a tmpfiles snippet making use of a) that sets the NOCOW flag for /var/lib/journal, which results in the flag being inherited by journal files that are created within it. If people then want to opt-out of NOCOW, they can simply override the tmpfiles snippet and all is good. That way we have a way to configure the bit, without actually introducing a high-level config option for this. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC][PATCH] Add option to enable COW for journal file
On 2015-03-06 13:31, Lennart Poettering wrote: On Thu, 05.03.15 21:39, Goffredo Baroncelli (kreij...@libero.it) wrote: Hi All, the enclosed patches add an option to the journald.conf file to allow a COW behavior for the journal files. [...] I am pretty strongly against adding an explicit option for this. I consider this all a temporary stopgap, until btrfs's autodefrag makes the problem go away, and I am very conservative with adding new config options where it is already clear that they will eventually be useless. What I'd be open to is: a) beef up the tmpfiles logic to be able to do the equivalent of /usr/bin/chattr on files. (By adding a new line type, make h or so). b) remove all code that sets NOCOW explicitly on journal files from journald. c) instead ship a tmpfiles snippet making use of a) that sets the NOCOW flag for /var/lib/journal, which results in the flag being inherited by journal files that are created within it. If people then want to opt-out of NOCOW, they can simply override the tmpfiles snippet and all is good. That way we have a way to configure the bit, without actually introducing a high-level config option for this. This seems reasonable; I will work on a proposal like this one. Lennart -- gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [RFC][PATCH] Add option to enable COW for journal file
Hi All, the enclosed patches add an option to the journald.conf file to allow a COW behavior for the journal files. The commit 11689d2a force the NOCOW flag of the journal files. This was needed because systemd-journald has very poor performance when the filesytem is BTRFS due to its the COW behavior. However removing the COW behavior, the journal file also lost the btrfs checksum protection, and this disables the BTRFS capability to rebuild a corrupted file [1] in a RAID filesystem. So this limits one of the biggest benefit of BTRFS. This patch adds the option CowJournal to the journald.conf to disable/enable the NOCOW flag for the journal file, allowing to revert to the old behavior. These patches are tagged as RFC, because I am not sure about the naming of the option (now CowJournal). I ask some feedback. Comments are welcome. [1] http://en.wikipedia.org/wiki/Data_scrubbing#Btrfs BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel