This source file includes following definitions.
- xchk_xattr_valuebuf
- xchk_xattr_usedmap
- xchk_xattr_freemap
- xchk_xattr_dstmap
1
2
3
4
5
6 #ifndef __XFS_SCRUB_ATTR_H__
7 #define __XFS_SCRUB_ATTR_H__
8
9
10
11
12 struct xchk_xattr_buf {
13
14 size_t sz;
15
16
17
18
19
20
21
22
23
24
25
26
27 uint8_t buf[0];
28 };
29
30
31 static inline uint8_t *
32 xchk_xattr_valuebuf(
33 struct xfs_scrub *sc)
34 {
35 struct xchk_xattr_buf *ab = sc->buf;
36
37 return ab->buf;
38 }
39
40
41 static inline unsigned long *
42 xchk_xattr_usedmap(
43 struct xfs_scrub *sc)
44 {
45 struct xchk_xattr_buf *ab = sc->buf;
46
47 return (unsigned long *)ab->buf;
48 }
49
50
51 static inline unsigned long *
52 xchk_xattr_freemap(
53 struct xfs_scrub *sc)
54 {
55 return xchk_xattr_usedmap(sc) +
56 BITS_TO_LONGS(sc->mp->m_attr_geo->blksize);
57 }
58
59
60 static inline unsigned long *
61 xchk_xattr_dstmap(
62 struct xfs_scrub *sc)
63 {
64 return xchk_xattr_freemap(sc) +
65 BITS_TO_LONGS(sc->mp->m_attr_geo->blksize);
66 }
67
68 int xchk_setup_xattr_buf(struct xfs_scrub *sc, size_t value_size,
69 xfs_km_flags_t flags);
70
71 #endif