diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-24 16:25:53 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-26 16:26:35 -0400 |
commit | 19ff84b20d62e62ff527a384b35102bf745a70d1 (patch) | |
tree | 84a820f1a56ef8e7822ad10a72b9bf0cb0629970 | |
parent | a44e4f8f00e3a443148dded2066d0f84c0dfebf5 (diff) |
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>
-rw-r--r-- | fs/bcachefs/io_write.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |