summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-02-25 03:07:21 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:54 +0300
commit33669e0cc94e9554cf162cbe2e63155887a10231 (patch)
tree2c39afb2b393d1d0b131af86456123573320ad00 /fs/bcachefs/io.c
parent1a14e255100cb17cface9ca179ca7ddba87fd8b9 (diff)
downloadlinux-33669e0cc94e9554cf162cbe2e63155887a10231.tar.xz
bcachefs: Add option for completely disabling nocow
This adds an option for completely disabling nocow mode, including the locking in the data move path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 6f7e4dac4268..ede2f3116935 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -1649,7 +1649,7 @@ static void __bch2_write(struct bch_write_op *op)
nofs_flags = memalloc_nofs_save();
- if (unlikely(op->opts.nocow)) {
+ if (unlikely(op->opts.nocow && c->opts.nocow_enabled)) {
bch2_nocow_write(op);
if (op->flags & BCH_WRITE_DONE)
goto out_nofs_restore;