summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-02-23 22:26:10 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:08:34 +0200
commitab05de4ce4a1b806773e59b97a59bcfabba57d8d (patch)
tree0e5bbbc438c75ae60e126af14a889f26fbc9e93d /fs/bcachefs/compress.c
parentbcachefs: Refactor rebalance_pred function (diff)
downloadlinux-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.tar.xz
linux-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.zip
bcachefs: Track incompressible data
This fixes the background_compression option: wihout some way of marking data as incompressible, rebalance will keep rewriting incompressible data over and over. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
-rw-r--r--fs/bcachefs/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 091958d1ea04..117afac3db1a 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -434,7 +434,7 @@ out:
bio_unmap_or_unbounce(c, dst_data);
return compression_type;
err:
- compression_type = 0;
+ compression_type = BCH_COMPRESSION_TYPE_incompressible;
goto out;
}