linux/fs/xfs/scrub/rcbag.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2022-2024 Oracle.  All Rights Reserved.
 * Author: Darrick J. Wong <[email protected]>
 */
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_btree.h"
#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
#include "xfs_error.h"
#include "scrub/scrub.h"
#include "scrub/rcbag_btree.h"
#include "scrub/rcbag.h"
#include "scrub/trace.h"

struct rcbag {};

int
rcbag_init(
	struct xfs_mount	*mp,
	struct xfs_buftarg	*btp,
	struct rcbag		**bagp)
{}

void
rcbag_free(
	struct rcbag		**bagp)
{}

/* Track an rmap in the refcount bag. */
int
rcbag_add(
	struct rcbag			*bag,
	struct xfs_trans		*tp,
	const struct xfs_rmap_irec	*rmap)
{}

/* Return the number of records in the bag. */
uint64_t
rcbag_count(
	const struct rcbag	*rcbag)
{}

static inline uint32_t rcbag_rec_next_bno(const struct rcbag_rec *r)
{}

/*
 * Find the next block where the refcount changes, given the next rmap we
 * looked at and the ones we're already tracking.
 */
int
rcbag_next_edge(
	struct rcbag			*bag,
	struct xfs_trans		*tp,
	const struct xfs_rmap_irec	*next_rmap,
	bool				next_valid,
	uint32_t			*next_bnop)
{}

/* Pop all refcount bag records that end at next_bno */
int
rcbag_remove_ending_at(
	struct rcbag		*bag,
	struct xfs_trans	*tp,
	uint32_t		next_bno)
{}

/* Dump the rcbag. */
void
rcbag_dump(
	struct rcbag			*bag,
	struct xfs_trans		*tp)
{}