#include "bcachefs.h"
#include "alloc_background.h"
#include "backpointers.h"
#include "bset.h"
#include "btree_gc.h"
#include "btree_update.h"
#include "buckets.h"
#include "buckets_waiting_for_journal.h"
#include "disk_accounting.h"
#include "ec.h"
#include "error.h"
#include "inode.h"
#include "movinggc.h"
#include "recovery.h"
#include "reflink.h"
#include "replicas.h"
#include "subvolume.h"
#include "trace.h"
#include <linux/preempt.h>
void bch2_dev_usage_read_fast(struct bch_dev *ca, struct bch_dev_usage *usage)
{ … }
static u64 reserve_factor(u64 r)
{ … }
static struct bch_fs_usage_short
__bch2_fs_usage_read_short(struct bch_fs *c)
{ … }
struct bch_fs_usage_short
bch2_fs_usage_read_short(struct bch_fs *c)
{ … }
void bch2_dev_usage_to_text(struct printbuf *out, struct bch_dev_usage *usage)
{ … }
static int bch2_check_fix_ptr(struct btree_trans *trans,
struct bkey_s_c k,
struct extent_ptr_decoded p,
const union bch_extent_entry *entry,
bool *do_update)
{ … }
int bch2_check_fix_ptrs(struct btree_trans *trans,
enum btree_id btree, unsigned level, struct bkey_s_c k,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_bucket_ref_update(struct btree_trans *trans, struct bch_dev *ca,
struct bkey_s_c k,
const struct bch_extent_ptr *ptr,
s64 sectors, enum bch_data_type ptr_data_type,
u8 b_gen, u8 bucket_data_type,
u32 *bucket_sectors)
{ … }
void bch2_trans_account_disk_usage_change(struct btree_trans *trans)
{ … }
static int __mark_pointer(struct btree_trans *trans, struct bch_dev *ca,
struct bkey_s_c k,
const struct extent_ptr_decoded *p,
s64 sectors, enum bch_data_type ptr_data_type,
struct bch_alloc_v4 *a)
{ … }
static int bch2_trigger_pointer(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c k, struct extent_ptr_decoded p,
const union bch_extent_entry *entry,
s64 *sectors,
enum btree_iter_update_trigger_flags flags)
{ … }
static int bch2_trigger_stripe_ptr(struct btree_trans *trans,
struct bkey_s_c k,
struct extent_ptr_decoded p,
enum bch_data_type data_type,
s64 sectors,
enum btree_iter_update_trigger_flags flags)
{ … }
static int __trigger_extent(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c k,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trigger_extent(struct btree_trans *trans,
enum btree_id btree, unsigned level,
struct bkey_s_c old, struct bkey_s new,
enum btree_iter_update_trigger_flags flags)
{ … }
static int __trigger_reservation(struct btree_trans *trans,
enum btree_id btree_id, unsigned level, struct bkey_s_c k,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trigger_reservation(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_s new,
enum btree_iter_update_trigger_flags flags)
{ … }
static int __bch2_trans_mark_metadata_bucket(struct btree_trans *trans,
struct bch_dev *ca, u64 b,
enum bch_data_type type,
unsigned sectors)
{ … }
static int bch2_mark_metadata_bucket(struct btree_trans *trans, struct bch_dev *ca,
u64 b, enum bch_data_type data_type, unsigned sectors,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trans_mark_metadata_bucket(struct btree_trans *trans,
struct bch_dev *ca, u64 b,
enum bch_data_type type, unsigned sectors,
enum btree_iter_update_trigger_flags flags)
{ … }
static int bch2_trans_mark_metadata_sectors(struct btree_trans *trans,
struct bch_dev *ca, u64 start, u64 end,
enum bch_data_type type, u64 *bucket, unsigned *bucket_sectors,
enum btree_iter_update_trigger_flags flags)
{ … }
static int __bch2_trans_mark_dev_sb(struct btree_trans *trans, struct bch_dev *ca,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trans_mark_dev_sb(struct bch_fs *c, struct bch_dev *ca,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trans_mark_dev_sbs_flags(struct bch_fs *c,
enum btree_iter_update_trigger_flags flags)
{ … }
int bch2_trans_mark_dev_sbs(struct bch_fs *c)
{ … }
#define SECTORS_CACHE …
int __bch2_disk_reservation_add(struct bch_fs *c, struct disk_reservation *res,
u64 sectors, int flags)
{ … }
void bch2_buckets_nouse_free(struct bch_fs *c)
{ … }
int bch2_buckets_nouse_alloc(struct bch_fs *c)
{ … }
static void bucket_gens_free_rcu(struct rcu_head *rcu)
{ … }
int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets)
{ … }
void bch2_dev_buckets_free(struct bch_dev *ca)
{ … }
int bch2_dev_buckets_alloc(struct bch_fs *c, struct bch_dev *ca)
{ … }