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 <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2025-03-24 16:25:53 -04:00
parent a44e4f8f00
commit 19ff84b20d

View File

@ -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);