diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-29 13:48:09 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-27 12:17:57 -0400 |
commit | eaa19219a7b2ad8afc3296664eadc705d88f23f8 (patch) | |
tree | d82952f6950e3c9bc076b658b9232a252c0e9162 /fs | |
parent | b74efd2dab2c3c1ad9cd592fab7a2818f2422c1e (diff) |
bcachefs: Put inline data behind a mount option for now
Inline data extents + reflink is still broken
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/io.c | 3 | ||||
-rw-r--r-- | fs/bcachefs/opts.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index a88df9f6ac9b..17ea38e42ae8 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -1222,7 +1222,8 @@ void bch2_write(struct closure *cl) data_len = min_t(u64, bio->bi_iter.bi_size, op->new_i_size - (op->pos.offset << 9)); - if (data_len <= min(block_bytes(c) / 2, 1024U)) { + if (c->opts.inline_data && + data_len <= min(block_bytes(c) / 2, 1024U)) { bch2_write_data_inline(op, data_len); return; } diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index 0ec0999a6214..1f11f4152a6f 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -181,6 +181,11 @@ enum opt_type { OPT_BOOL(), \ BCH_SB_128_BIT_MACS, false, \ NULL, "Store full 128 bits of cryptographic MACs, instead of 80")\ + x(inline_data, u8, \ + OPT_MOUNT|OPT_RUNTIME, \ + OPT_BOOL(), \ + NO_SB_OPT, false, \ + NULL, "Enable inline data extents") \ x(acl, u8, \ OPT_FORMAT|OPT_MOUNT, \ OPT_BOOL(), \ |