diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-11-23 20:14:55 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:49 -0400 |
commit | 01ad673727b59664c9d12df4e5b6f5bad1ea2825 (patch) | |
tree | db93047878a22efa13d8c91c3229639a5c4ebf79 /fs/bcachefs/inode.c | |
parent | f52dd1ae20ac8094eb881f816e7274d3f7910a84 (diff) | |
download | lwn-01ad673727b59664c9d12df4e5b6f5bad1ea2825.tar.gz lwn-01ad673727b59664c9d12df4e5b6f5bad1ea2825.zip |
bcachefs: bch2_inode_opts_get()
This improves io_opts() and makes it a non-inline function - it's big
enough that it probably shouldn't be.
Also, bch_io_opts no longer needs fields for whether options are
defined, so we can slim it down a bit.
We'd like to stop passing around the full bch_io_opts, but that'll be
tricky because of bch2_rebalance_add_key().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.c')
-rw-r--r-- | fs/bcachefs/inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 6e7ba2e6fe33..9eeabe70aec1 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -768,3 +768,11 @@ struct bch_opts bch2_inode_opts_to_opts(struct bch_inode_unpacked *inode) #undef x return ret; } + +void bch2_inode_opts_get(struct bch_io_opts *opts, struct bch_fs *c, + struct bch_inode_unpacked *inode) +{ +#define x(_name, _bits) opts->_name = inode_opt_get(c, inode, _name); + BCH_INODE_OPTS() +#undef x +} |