From: Daniel Hill Date: Sat, 15 Oct 2022 13:25:54 +0000 (+1300) Subject: bcachefs: __bio_compress() fix up. X-Git-Tag: io_uring-6.7-2023-11-10~119^2~706 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=be75bb7a0e0565c0c409842048567e8d07f28675;p=linux-block.git bcachefs: __bio_compress() fix up. A single block can't be compressed, so it's incompressible. This stops rebalance repeatably marking extents as uncompressed. Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c index f692f35a6a98..2b7080b67eca 100644 --- a/fs/bcachefs/compress.c +++ b/fs/bcachefs/compress.c @@ -377,7 +377,7 @@ static unsigned __bio_compress(struct bch_fs *c, /* If it's only one block, don't bother trying to compress: */ if (src->bi_iter.bi_size <= c->opts.block_size) - return 0; + return BCH_COMPRESSION_TYPE_incompressible; dst_data = bio_map_or_bounce(c, dst, WRITE); src_data = bio_map_or_bounce(c, src, READ);