linux/fs/xfs/scrub/dirtree.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (c) 2023-2024 Oracle.  All Rights Reserved.
 * Author: Darrick J. Wong <[email protected]>
 */
#ifndef __XFS_SCRUB_DIRTREE_H__
#define __XFS_SCRUB_DIRTREE_H__

/*
 * Each of these represents one parent pointer path step in a chain going
 * up towards the directory tree root.  These are stored inside an xfarray.
 */
struct xchk_dirpath_step {};

enum xchk_dirpath_outcome {};

/*
 * Each of these represents one parent pointer path out of the directory being
 * scanned.  These exist in-core, and hopefully there aren't more than a
 * handful of them.
 */
struct xchk_dirpath {};

struct xchk_dirtree_outcomes {};

struct xchk_dirtree {};

#define xchk_dirtree_for_each_path_safe(dl, path, n)

#define xchk_dirtree_for_each_path(dl, path)

static inline bool
xchk_dirtree_parentless(const struct xchk_dirtree *dl)
{}

int xchk_dirtree_find_paths_to_root(struct xchk_dirtree *dl);
int xchk_dirpath_append(struct xchk_dirtree *dl, struct xfs_inode *ip,
		struct xchk_dirpath *path, const struct xfs_name *name,
		const struct xfs_parent_rec *pptr);
void xchk_dirtree_evaluate(struct xchk_dirtree *dl,
		struct xchk_dirtree_outcomes *oc);

#endif /* __XFS_SCRUB_DIRTREE_H__ */