diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-13 03:48:32 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:07 +0200 |
commit | 9f343e24f541bef3d5f081925eae5734c2c39c28 (patch) | |
tree | 50acbc53466bed838042a96a789d43c016ec8c61 /fs/bcachefs/disk_groups.h | |
parent | bcachefs: Convert snapshot table to RCU array (diff) | |
download | linux-9f343e24f541bef3d5f081925eae5734c2c39c28.tar.xz linux-9f343e24f541bef3d5f081925eae5734c2c39c28.zip |
bcachefs: bch_opt_fn
Minor refactoring to get rid of some unneeded token pasting.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_groups.h')
-rw-r--r-- | fs/bcachefs/disk_groups.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/disk_groups.h b/fs/bcachefs/disk_groups.h index ec12584ceee7..bd7711767fd4 100644 --- a/fs/bcachefs/disk_groups.h +++ b/fs/bcachefs/disk_groups.h @@ -85,9 +85,14 @@ int bch2_disk_path_find_or_create(struct bch_sb_handle *, const char *); void bch2_disk_path_to_text(struct printbuf *, struct bch_sb *, unsigned); -int bch2_opt_target_parse(struct bch_fs *, const char *, u64 *); +int bch2_opt_target_parse(struct bch_fs *, const char *, u64 *, struct printbuf *); void bch2_opt_target_to_text(struct printbuf *, struct bch_fs *, struct bch_sb *, u64); +#define bch2_opt_target (struct bch_opt_fn) { \ + .parse = bch2_opt_target_parse, \ + .to_text = bch2_opt_target_to_text, \ +} + int bch2_sb_disk_groups_to_cpu(struct bch_fs *); int __bch2_dev_group_set(struct bch_fs *, struct bch_dev *, const char *); |