linux/fs/bcachefs/recovery.c

// SPDX-License-Identifier: GPL-2.0

#include "bcachefs.h"
#include "alloc_background.h"
#include "bkey_buf.h"
#include "btree_journal_iter.h"
#include "btree_node_scan.h"
#include "btree_update.h"
#include "btree_update_interior.h"
#include "btree_io.h"
#include "buckets.h"
#include "dirent.h"
#include "disk_accounting.h"
#include "errcode.h"
#include "error.h"
#include "fs-common.h"
#include "journal_io.h"
#include "journal_reclaim.h"
#include "journal_seq_blacklist.h"
#include "logged_ops.h"
#include "move.h"
#include "quota.h"
#include "rebalance.h"
#include "recovery.h"
#include "recovery_passes.h"
#include "replicas.h"
#include "sb-clean.h"
#include "sb-downgrade.h"
#include "snapshot.h"
#include "super-io.h"

#include <linux/sort.h>
#include <linux/stat.h>

#define QSTR(n)

void bch2_btree_lost_data(struct bch_fs *c, enum btree_id btree)
{}

/* for -o reconstruct_alloc: */
static void bch2_reconstruct_alloc(struct bch_fs *c)
{}

/*
 * Btree node pointers have a field to stack a pointer to the in memory btree
 * node; we need to zero out this field when reading in btree nodes, or when
 * reading in keys from the journal:
 */
static void zero_out_btree_mem_ptr(struct journal_keys *keys)
{}

/* journal replay: */

static void replay_now_at(struct journal *j, u64 seq)
{}

static int bch2_journal_replay_accounting_key(struct btree_trans *trans,
					      struct journal_key *k)
{}

static int bch2_journal_replay_key(struct btree_trans *trans,
				   struct journal_key *k)
{}

static int journal_sort_seq_cmp(const void *_l, const void *_r)
{}

int bch2_journal_replay(struct bch_fs *c)
{}

/* journal replay early: */

static int journal_replay_entry_early(struct bch_fs *c,
				      struct jset_entry *entry)
{}

static int journal_replay_early(struct bch_fs *c,
				struct bch_sb_field_clean *clean)
{}

/* sb clean section: */

static int read_btree_roots(struct bch_fs *c)
{}

static bool check_version_upgrade(struct bch_fs *c)
{}

int bch2_fs_recovery(struct bch_fs *c)
{}

int bch2_fs_initialize(struct bch_fs *c)
{}