| .. | .. |
|---|
| 9 | 9 | #include "xfs_format.h" |
|---|
| 10 | 10 | #include "xfs_trans_resv.h" |
|---|
| 11 | 11 | #include "xfs_mount.h" |
|---|
| 12 | | -#include "xfs_defer.h" |
|---|
| 13 | 12 | #include "xfs_btree.h" |
|---|
| 14 | | -#include "xfs_bit.h" |
|---|
| 15 | | -#include "xfs_log_format.h" |
|---|
| 16 | | -#include "xfs_trans.h" |
|---|
| 17 | | -#include "xfs_sb.h" |
|---|
| 18 | | -#include "xfs_alloc.h" |
|---|
| 19 | | -#include "xfs_ialloc.h" |
|---|
| 20 | 13 | #include "xfs_rmap.h" |
|---|
| 21 | 14 | #include "xfs_refcount.h" |
|---|
| 22 | | -#include "scrub/xfs_scrub.h" |
|---|
| 23 | 15 | #include "scrub/scrub.h" |
|---|
| 24 | 16 | #include "scrub/common.h" |
|---|
| 25 | 17 | #include "scrub/btree.h" |
|---|
| 26 | | -#include "scrub/trace.h" |
|---|
| 27 | 18 | |
|---|
| 28 | 19 | /* |
|---|
| 29 | 20 | * Set us up to scrub reverse mapping btrees. |
|---|
| .. | .. |
|---|
| 101 | 92 | { |
|---|
| 102 | 93 | struct xfs_mount *mp = bs->cur->bc_mp; |
|---|
| 103 | 94 | struct xfs_rmap_irec irec; |
|---|
| 104 | | - xfs_agnumber_t agno = bs->cur->bc_private.a.agno; |
|---|
| 95 | + xfs_agnumber_t agno = bs->cur->bc_ag.agno; |
|---|
| 105 | 96 | bool non_inode; |
|---|
| 106 | 97 | bool is_unwritten; |
|---|
| 107 | 98 | bool is_bmbt; |
|---|
| .. | .. |
|---|
| 174 | 165 | xchk_rmapbt( |
|---|
| 175 | 166 | struct xfs_scrub *sc) |
|---|
| 176 | 167 | { |
|---|
| 177 | | - struct xfs_owner_info oinfo; |
|---|
| 178 | | - |
|---|
| 179 | | - xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG); |
|---|
| 180 | 168 | return xchk_btree(sc, sc->sa.rmap_cur, xchk_rmapbt_rec, |
|---|
| 181 | | - &oinfo, NULL); |
|---|
| 169 | + &XFS_RMAP_OINFO_AG, NULL); |
|---|
| 182 | 170 | } |
|---|
| 183 | 171 | |
|---|
| 184 | 172 | /* xref check that the extent is owned by a given owner */ |
|---|
| 185 | 173 | static inline void |
|---|
| 186 | 174 | xchk_xref_check_owner( |
|---|
| 187 | | - struct xfs_scrub *sc, |
|---|
| 188 | | - xfs_agblock_t bno, |
|---|
| 189 | | - xfs_extlen_t len, |
|---|
| 190 | | - struct xfs_owner_info *oinfo, |
|---|
| 191 | | - bool should_have_rmap) |
|---|
| 175 | + struct xfs_scrub *sc, |
|---|
| 176 | + xfs_agblock_t bno, |
|---|
| 177 | + xfs_extlen_t len, |
|---|
| 178 | + const struct xfs_owner_info *oinfo, |
|---|
| 179 | + bool should_have_rmap) |
|---|
| 192 | 180 | { |
|---|
| 193 | | - bool has_rmap; |
|---|
| 194 | | - int error; |
|---|
| 181 | + bool has_rmap; |
|---|
| 182 | + int error; |
|---|
| 195 | 183 | |
|---|
| 196 | 184 | if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) |
|---|
| 197 | 185 | return; |
|---|
| .. | .. |
|---|
| 207 | 195 | /* xref check that the extent is owned by a given owner */ |
|---|
| 208 | 196 | void |
|---|
| 209 | 197 | xchk_xref_is_owned_by( |
|---|
| 210 | | - struct xfs_scrub *sc, |
|---|
| 211 | | - xfs_agblock_t bno, |
|---|
| 212 | | - xfs_extlen_t len, |
|---|
| 213 | | - struct xfs_owner_info *oinfo) |
|---|
| 198 | + struct xfs_scrub *sc, |
|---|
| 199 | + xfs_agblock_t bno, |
|---|
| 200 | + xfs_extlen_t len, |
|---|
| 201 | + const struct xfs_owner_info *oinfo) |
|---|
| 214 | 202 | { |
|---|
| 215 | 203 | xchk_xref_check_owner(sc, bno, len, oinfo, true); |
|---|
| 216 | 204 | } |
|---|
| .. | .. |
|---|
| 218 | 206 | /* xref check that the extent is not owned by a given owner */ |
|---|
| 219 | 207 | void |
|---|
| 220 | 208 | xchk_xref_is_not_owned_by( |
|---|
| 221 | | - struct xfs_scrub *sc, |
|---|
| 222 | | - xfs_agblock_t bno, |
|---|
| 223 | | - xfs_extlen_t len, |
|---|
| 224 | | - struct xfs_owner_info *oinfo) |
|---|
| 209 | + struct xfs_scrub *sc, |
|---|
| 210 | + xfs_agblock_t bno, |
|---|
| 211 | + xfs_extlen_t len, |
|---|
| 212 | + const struct xfs_owner_info *oinfo) |
|---|
| 225 | 213 | { |
|---|
| 226 | 214 | xchk_xref_check_owner(sc, bno, len, oinfo, false); |
|---|
| 227 | 215 | } |
|---|