#include <linux/kernel.h>
#include "bcachefs.h"
#include "compress.h"
#include "disk_groups.h"
#include "error.h"
#include "opts.h"
#include "recovery_passes.h"
#include "super-io.h"
#include "util.h"
#define x …
const char * const bch2_error_actions[] = …;
const char * const bch2_fsck_fix_opts[] = …;
const char * const bch2_version_upgrade_opts[] = …;
const char * const bch2_sb_features[] = …;
const char * const bch2_sb_compat[] = …;
const char * const __bch2_btree_ids[] = …;
static const char * const __bch2_csum_types[] = …;
const char * const bch2_csum_opts[] = …;
static const char * const __bch2_compression_types[] = …;
const char * const bch2_compression_opts[] = …;
const char * const bch2_str_hash_types[] = …;
const char * const bch2_str_hash_opts[] = …;
const char * const __bch2_data_types[] = …;
const char * const bch2_member_states[] = …;
static const char * const __bch2_jset_entry_types[] = …;
static const char * const __bch2_fs_usage_types[] = …;
#undef x
static void prt_str_opt_boundscheck(struct printbuf *out, const char * const opts[],
unsigned nr, const char *type, unsigned idx)
{ … }
#define PRT_STR_OPT_BOUNDSCHECKED(name, type) …
PRT_STR_OPT_BOUNDSCHECKED(jset_entry_type, enum bch_jset_entry_type);
PRT_STR_OPT_BOUNDSCHECKED(fs_usage_type, enum bch_fs_usage_type);
PRT_STR_OPT_BOUNDSCHECKED(data_type, enum bch_data_type);
PRT_STR_OPT_BOUNDSCHECKED(csum_type, enum bch_csum_type);
PRT_STR_OPT_BOUNDSCHECKED(compression_type, enum bch_compression_type);
static int bch2_opt_fix_errors_parse(struct bch_fs *c, const char *val, u64 *res,
struct printbuf *err)
{ … }
static void bch2_opt_fix_errors_to_text(struct printbuf *out,
struct bch_fs *c,
struct bch_sb *sb,
u64 v)
{ … }
#define bch2_opt_fix_errors …
const char * const bch2_d_types[BCH_DT_MAX] = …;
u64 BCH2_NO_SB_OPT(const struct bch_sb *sb)
{ … }
void SET_BCH2_NO_SB_OPT(struct bch_sb *sb, u64 v)
{ … }
void bch2_opts_apply(struct bch_opts *dst, struct bch_opts src)
{ … }
bool bch2_opt_defined_by_id(const struct bch_opts *opts, enum bch_opt_id id)
{ … }
u64 bch2_opt_get_by_id(const struct bch_opts *opts, enum bch_opt_id id)
{ … }
void bch2_opt_set_by_id(struct bch_opts *opts, enum bch_opt_id id, u64 v)
{ … }
const struct bch_option bch2_opt_table[] = …;
int bch2_opt_lookup(const char *name)
{ … }
struct synonym { … };
static const struct synonym bch_opt_synonyms[] = …;
static int bch2_mount_opt_lookup(const char *name)
{ … }
int bch2_opt_validate(const struct bch_option *opt, u64 v, struct printbuf *err)
{ … }
int bch2_opt_parse(struct bch_fs *c,
const struct bch_option *opt,
const char *val, u64 *res,
struct printbuf *err)
{ … }
void bch2_opt_to_text(struct printbuf *out,
struct bch_fs *c, struct bch_sb *sb,
const struct bch_option *opt, u64 v,
unsigned flags)
{ … }
int bch2_opt_check_may_set(struct bch_fs *c, int id, u64 v)
{ … }
int bch2_opts_check_may_set(struct bch_fs *c)
{ … }
int bch2_parse_one_mount_opt(struct bch_fs *c, struct bch_opts *opts,
struct printbuf *parse_later,
const char *name, const char *val)
{ … }
int bch2_parse_mount_opts(struct bch_fs *c, struct bch_opts *opts,
struct printbuf *parse_later, char *options)
{ … }
u64 bch2_opt_from_sb(struct bch_sb *sb, enum bch_opt_id id)
{ … }
int bch2_opts_from_sb(struct bch_opts *opts, struct bch_sb *sb)
{ … }
void __bch2_opt_set_sb(struct bch_sb *sb, const struct bch_option *opt, u64 v)
{ … }
void bch2_opt_set_sb(struct bch_fs *c, const struct bch_option *opt, u64 v)
{ … }
struct bch_io_opts bch2_opts_to_inode_opts(struct bch_opts src)
{ … }
bool bch2_opt_is_inode_opt(enum bch_opt_id id)
{ … }