]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/da_util.h
xfs_repair: don't flag log_incompat inconsistencies as corruptions
[thirdparty/xfsprogs-dev.git] / repair / da_util.h
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0
360f4a2e
ES
2/*
3 * Copyright (c) 2015 Red Hat, Inc.
4 * All Rights Reserved.
360f4a2e
ES
5 */
6
7#ifndef _XR_DA_UTIL_H
8#define _XR_DA_UTIL_H
9
10struct da_level_state {
167137fe 11 struct xfs_buf *bp; /* block bp */
360f4a2e
ES
12 xfs_dablk_t bno; /* file block number */
13 xfs_dahash_t hashval; /* last verified hashval */
14 int index; /* current index in block */
15 int dirty; /* is buffer dirty ? (1 == yes) */
16};
17
18typedef struct da_bt_cursor {
19 int active; /* highest level in tree (# levels-1) */
20 xfs_ino_t ino;
21 xfs_dablk_t greatest_bno;
7328ea6e 22 struct xfs_dinode *dip;
360f4a2e
ES
23 struct da_level_state level[XFS_DA_NODE_MAXDEPTH];
24 struct blkmap *blkmap;
25} da_bt_cursor_t;
26
360f4a2e
ES
27struct xfs_buf *
28da_read_buf(
29 xfs_mount_t *mp,
30 int nex,
31 bmap_ext_t *bmp,
32 const struct xfs_buf_ops *ops);
33
34void
35release_da_cursor(
36 xfs_mount_t *mp,
37 da_bt_cursor_t *cursor,
38 int prev_level);
39
40void
41err_release_da_cursor(
42 xfs_mount_t *mp,
43 da_bt_cursor_t *cursor,
44 int prev_level);
45
46int
47traverse_int_dablock(
48 xfs_mount_t *mp,
49 da_bt_cursor_t *da_cursor,
50 xfs_dablk_t *rbno,
51 int whichfork);
52
53int
54verify_da_path(
55 xfs_mount_t *mp,
56 da_bt_cursor_t *cursor,
57 const int p_level,
58 int whichfork);
59
60int
61verify_final_da_path(
62 xfs_mount_t *mp,
63 da_bt_cursor_t *cursor,
5cd3b070
ES
64 const int p_level,
65 int whichfork);
360f4a2e 66#endif /* _XR_DA_UTIL_H */