summaryrefslogtreecommitdiff
path: root/libbcachefs/inode.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/inode.h')
-rw-r--r--libbcachefs/inode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbcachefs/inode.h b/libbcachefs/inode.h
index a9742bb6..be016043 100644
--- a/libbcachefs/inode.h
+++ b/libbcachefs/inode.h
@@ -157,6 +157,8 @@ io_opts(struct bch_fs *c, struct bch_inode_unpacked *inode)
struct bch_io_opts opts = bch2_opts_to_inode_opts(c->opts);
bch2_io_opts_apply(&opts, bch2_inode_opts_get(inode));
+ if (opts.nocow)
+ opts.compression = opts.background_compression = opts.data_checksum = opts.erasure_code;
return opts;
}