Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
journal: Fix disabling NO_COW on btrfs filesystems
Disabling NOCOW when data has been written to a file doesn't work. Instead, when we're done writing to a journal file (after archiving), let's rewrite the file with COW enabled. This also takes care of properly defragmenting the file. With zstd compression level 3, journal files are compressed to 12% of their original size with default journal settings. As rewriting the file might take a while since we also do an fsync() after the rewrite, this work is done in the offline thread to avoid blocking the journald event loop.
- Loading branch information
1 parent
5a98019
commit d71ece3
Showing
3 changed files
with
26 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters