From: Kent Overstreet Date: Mon, 24 Mar 2025 20:25:53 +0000 (-0400) Subject: bcachefs: Don't unnecessarily decrypt data when moving X-Git-Tag: block-6.15-20250403~4^2~28 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=19ff84b20d62e62ff527a384b35102bf745a70d1;p=linux-block.git bcachefs: Don't unnecessarily decrypt data when moving There's various checks for "are we going to compress this" - but we're not going to compress if we know it's incompressible. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c index 9613361a519b..07b55839768e 100644 --- a/fs/bcachefs/io_write.c +++ b/fs/bcachefs/io_write.c @@ -940,6 +940,9 @@ static int bch2_write_extent(struct bch_write_op *op, struct write_point *wp, bool page_alloc_failed = false; int ret, more = 0; + if (op->incompressible) + op->compression_opt = 0; + BUG_ON(!bio_sectors(src)); ec_buf = bch2_writepoint_ec_buf(c, wp);