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: v6.15-rc1~83^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19ff84b20d62e62ff527a384b35102bf745a70d1;p=thirdparty%2Flinux.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 9613361a519ba..07b55839768ea 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);