From: Goffredo Baroncelli <kreij...@inwind.it> Partially revert patch 11689d2a, which force the NOCOW attribute for the journal files. This patch was introduced to allievate the perfomances problem that journald shows on the BTRFS filesystem.
Because the NOCOW attribute is forced the user can't revert to the old behavior. However NOCOW attribute disables the btrfs checksums, which prevent BTRFS to rebuild a currupted file in an RAIDx filesystem. To continue to set the NOCOW attribute, use the h|H command of systemd-tmpfile. --- src/journal/journal-file.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 2845e05..65e3e38 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -2602,18 +2602,6 @@ int journal_file_open( goto fail; if (f->last_stat.st_size == 0 && f->writable) { - - /* Before we write anything, turn off COW logic. Given - * our write pattern that is quite unfriendly to COW - * file systems this should greatly improve - * performance on COW file systems, such as btrfs, at - * the expense of data integrity features (which - * shouldn't be too bad, given that we do our own - * checksumming). */ - r = chattr_fd(f->fd, true, FS_NOCOW_FL); - if (r < 0) - log_warning_errno(errno, "Failed to set file attributes: %m"); - /* Let's attach the creation time to the journal file, * so that the vacuuming code knows the age of this * file even if the file might end up corrupted one -- 2.1.4 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel