summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-02-23 16:26:10 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:34 -0400
commitab05de4ce4a1b806773e59b97a59bcfabba57d8d (patch)
tree0e5bbbc438c75ae60e126af14a889f26fbc9e93d /fs/bcachefs/compress.c
parent182084e3dc5f55de12f0184ddd6243f64b6cd87b (diff)
downloadlinux-stable-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.tar.gz
linux-stable-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.tar.bz2
linux-stable-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;
}