bcachefs: Improve bch2_inode_opts_to_opts()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 24 Nov 2022 01:28:15 +0000 (20:28 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:46 +0000 (17:09 -0400)
commitabb936fb9f2ab4a447a266477d65e50d476277a5
treefaa4c9a4d7ba0f2da2215b76f74fc98d8e0cb5df
parent98638ffa1d914e780a527c0bd92323f0b7307f09
bcachefs: Improve bch2_inode_opts_to_opts()

It turns out the *_defined entries of bch_io_opts are only used in one
place - in the xattr get path - and there we immediately convert to a
bch_opts struct, which also has the *_defined entries.

This patch changes bch2_inode_opts_to_opts() to go directly from
bch_inode_unpacked to bch_opts, which is a minor simplification and will
also let us slim down struct bch_io_opts in another patch.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/inode.c
fs/bcachefs/inode.h
fs/bcachefs/opts.c
fs/bcachefs/opts.h
fs/bcachefs/xattr.c