linux/fs/bcachefs/sb-downgrade.c

// SPDX-License-Identifier: GPL-2.0

/*
 * Superblock section that contains a list of recovery passes to run when
 * downgrading past a given version
 */

#include "bcachefs.h"
#include "darray.h"
#include "recovery_passes.h"
#include "sb-downgrade.h"
#include "sb-errors.h"
#include "super-io.h"

#define RECOVERY_PASS_ALL_FSCK

/*
 * Upgrade, downgrade tables - run certain recovery passes, fix certain errors
 *
 * x(version, recovery_passes, errors...)
 */
#define UPGRADE_TABLE()

#define DOWNGRADE_TABLE()

struct upgrade_downgrade_entry {};

#define x
UPGRADE_TABLE()
#undef x

static const struct upgrade_downgrade_entry upgrade_table[] =;

static int have_stripes(struct bch_fs *c)
{}

int bch2_sb_set_upgrade_extra(struct bch_fs *c)
{}

void bch2_sb_set_upgrade(struct bch_fs *c,
			 unsigned old_version,
			 unsigned new_version)
{}

#define x
DOWNGRADE_TABLE()
#undef x

static const struct upgrade_downgrade_entry downgrade_table[] =;

static int downgrade_table_extra(struct bch_fs *c, darray_char *table)
{}

static inline const struct bch_sb_field_downgrade_entry *
downgrade_entry_next_c(const struct bch_sb_field_downgrade_entry *e)
{}

#define for_each_downgrade_entry(_d, _i)

static int bch2_sb_downgrade_validate(struct bch_sb *sb, struct bch_sb_field *f,
				      enum bch_validate_flags flags, struct printbuf *err)
{}

static void bch2_sb_downgrade_to_text(struct printbuf *out, struct bch_sb *sb,
				      struct bch_sb_field *f)
{}

const struct bch_sb_field_ops bch_sb_field_ops_downgrade =;

int bch2_sb_downgrade_update(struct bch_fs *c)
{}

void bch2_sb_set_downgrade(struct bch_fs *c, unsigned new_minor, unsigned old_minor)
{}