Skip to content

btrfs-progs: docs: update the compatibility about compression #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Documentation/ch-compression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,18 @@ pattern detection, byte frequency, Shannon entropy.
Compatibility
-------------

Compression is done using the COW mechanism so it's incompatible with
*nodatacow*. Direct IO read works on compressed files but will fall back to
buffered writes and leads to no compression even if force compression is set.
Currently *nodatasum* and compression don't work together.
Compression requires both data checksum and COW, so either *nodatasum* or
*nodatasum* mount option/inode flag will result no compression.

Direct IO reads on compressed data will always fallback to buffered reads.

Direct IO write behavior depends on the inode flag.
For inodes with data checksum, direct IO writes always fallback to buffered
writes, thus can generate compressed data if the mount option/inode flags allows.

For inodes without data checksum, direct IO writes will not populate page cache,
and since the inode has no data checksum, no compressed data will be generated
anyway.

The compression algorithms have been added over time so the version
compatibility should be also considered, together with other tools that may
Expand Down