summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.h
diff options
context:
space:
mode:
authorBrett Holman <bholman.devel@gmail.com>2022-05-04 01:50:57 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:32 +0300
commit372c11125a2e07485fcd4cb08601f24d8a3bc3c6 (patch)
tree5247e30d2087d97244468d4ab81d6e07da640fb6 /fs/bcachefs/opts.h
parentee4d17d0325c5806c7ef0f4b3c8604d5ebf65000 (diff)
downloadlinux-372c11125a2e07485fcd4cb08601f24d8a3bc3c6.tar.xz
bcachefs: Make bch_option compatible with Rust ffi
Rust FFI lacks support for unnamed structs and unions. The space saved in bch_option is not enough to be significant. Signed-off-by: Brett Holman <bholman.devel@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r--fs/bcachefs/opts.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index 863891dcb554..e15ffb07416b 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -455,17 +455,9 @@ struct bch_option {
enum opt_flags flags;
u64 min, max;
- union {
- struct {
- };
- struct {
- const char * const *choices;
- };
- struct {
- int (*parse)(struct bch_fs *, const char *, u64 *);
- void (*to_text)(struct printbuf *, struct bch_fs *, struct bch_sb *, u64);
- };
- };
+ const char * const *choices;
+ int (*parse)(struct bch_fs *, const char *, u64 *);
+ void (*to_text)(struct printbuf *, struct bch_fs *, struct bch_sb *, u64);
const char *hint;
const char *help;