]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | struct da_level_state { | |
11 | xfs_buf_t *bp; /* block bp */ | |
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 | ||
18 | typedef struct da_bt_cursor { | |
19 | int active; /* highest level in tree (# levels-1) */ | |
20 | xfs_ino_t ino; | |
21 | xfs_dablk_t greatest_bno; | |
22 | xfs_dinode_t *dip; | |
23 | struct da_level_state level[XFS_DA_NODE_MAXDEPTH]; | |
24 | struct blkmap *blkmap; | |
25 | } da_bt_cursor_t; | |
26 | ||
27 | int | |
28 | namecheck( | |
29 | char *name, | |
45571fd5 ES |
30 | int length, |
31 | bool isadir); | |
360f4a2e ES |
32 | |
33 | struct xfs_buf * | |
34 | da_read_buf( | |
35 | xfs_mount_t *mp, | |
36 | int nex, | |
37 | bmap_ext_t *bmp, | |
38 | const struct xfs_buf_ops *ops); | |
39 | ||
40 | void | |
41 | release_da_cursor( | |
42 | xfs_mount_t *mp, | |
43 | da_bt_cursor_t *cursor, | |
44 | int prev_level); | |
45 | ||
46 | void | |
47 | err_release_da_cursor( | |
48 | xfs_mount_t *mp, | |
49 | da_bt_cursor_t *cursor, | |
50 | int prev_level); | |
51 | ||
52 | int | |
53 | traverse_int_dablock( | |
54 | xfs_mount_t *mp, | |
55 | da_bt_cursor_t *da_cursor, | |
56 | xfs_dablk_t *rbno, | |
57 | int whichfork); | |
58 | ||
59 | int | |
60 | verify_da_path( | |
61 | xfs_mount_t *mp, | |
62 | da_bt_cursor_t *cursor, | |
63 | const int p_level, | |
64 | int whichfork); | |
65 | ||
66 | int | |
67 | verify_final_da_path( | |
68 | xfs_mount_t *mp, | |
69 | da_bt_cursor_t *cursor, | |
5cd3b070 ES |
70 | const int p_level, |
71 | int whichfork); | |
360f4a2e | 72 | #endif /* _XR_DA_UTIL_H */ |