Skip to content

Commit 19ff84b

Browse files
author
Kent Overstreet
committed
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 <[email protected]>
1 parent a44e4f8 commit 19ff84b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/bcachefs/io_write.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,9 @@ static int bch2_write_extent(struct bch_write_op *op, struct write_point *wp,
940940
bool page_alloc_failed = false;
941941
int ret, more = 0;
942942

943+
if (op->incompressible)
944+
op->compression_opt = 0;
945+
943946
BUG_ON(!bio_sectors(src));
944947

945948
ec_buf = bch2_writepoint_ec_buf(c, wp);

0 commit comments

Comments
 (0)