From f240b9f6d04100604dfb605182729f5f49657ff3 Mon Sep 17 00:00:00 2001 From: HAN Yuwei Date: Sat, 23 Mar 2024 22:12:04 +0800 Subject: [PATCH] btrfs-progs: docs: fix incorrect description about compression with O_DIRECT It was reported in https://lore.kernel.org/linux-btrfs/e7ce9995-93cb-4904-875c-684d4494765f@web.de/ that compression does not happen on direct io files. This is incorrectly documented that it works but this is not true. Compression works on buffered writes and relies on page cache, while direct io avoids that and takes a different path in code. [ci skip] Pull-request: #764 Author: HAN Yuwei Signed-off-by: David Sterba --- Documentation/ch-compression.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/ch-compression.rst b/Documentation/ch-compression.rst index 291265bc..a9ec8f1e 100644 --- a/Documentation/ch-compression.rst +++ b/Documentation/ch-compression.rst @@ -145,9 +145,9 @@ Compatibility ------------- Compression is done using the COW mechanism so it's incompatible with -*nodatacow*. Direct IO works on compressed files but will fall back to buffered -writes and leads to recompression. Currently *nodatasum* and compression don't -work together. +*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. The compression algorithms have been added over time so the version compatibility should be also considered, together with other tools that may