3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# This file is part of systemd.
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# systemd is free software; you can redistribute it and/or modify it
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# under the terms of the GNU Lesser General Public License as published by
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# the Free Software Foundation; either version 2.1 of the License, or
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# (at your option) any later version.
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# See tmpfiles.d(5) for details
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# Set the NOCOW attribute for directories of journal files. This flag
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# is inheredited by their new files and sub-directories. Matters only
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# for btrfs filesystems.
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# WARNING: Enabling the NOCOW attribute improves journal performance
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# substantially, but also disables the btrfs checksum logic. In
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# btrfs RAID filesystems the checksums are needed for rebuilding
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# corrupted files. Without checksums such rebuilds are not
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# In a single-disk filesystem (or a filesystem without redundancy)
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# enabling the NOCOW attribute for journal files is safe, because
3a92e4ba470611ceec6693640b05eb248d62e32dGoffredo Baroncelli# they have their own checksums and a rebuilding wouldn't be possible