diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-10-20 01:21:43 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-21 01:36:15 -0500 |
| commit | eacb755568d68337de6e6f734b00df40780c4e30 (patch) | |
| tree | d639674ec4dc903d074442d081287abf82d80909 /fs/bcachefs/opts.c | |
| parent | bcachefs: use bch2_data_update_opts_to_text() in trace_move_extent_fail() (diff) | |
| download | linux-eacb755568d68337de6e6f734b00df40780c4e30.tar.gz linux-eacb755568d68337de6e6f734b00df40780c4e30.zip | |
bcachefs: bch2_io_opts_fixups()
Centralize some io path option fixups - they weren't always being
applied correctly:
- background_compression uses compression if unset
- background_target uses foreground_target if unset
- nocow disables most fancy io path options
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
| -rw-r--r-- | fs/bcachefs/opts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index 0e2ee262fbd4..1f5843284e9e 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -710,11 +710,14 @@ void bch2_opt_set_sb(struct bch_fs *c, struct bch_dev *ca, struct bch_io_opts bch2_opts_to_inode_opts(struct bch_opts src) { - return (struct bch_io_opts) { + struct bch_io_opts opts = { #define x(_name, _bits) ._name = src._name, BCH_INODE_OPTS() #undef x }; + + bch2_io_opts_fixups(&opts); + return opts; } bool bch2_opt_is_inode_opt(enum bch_opt_id id) |
