hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/xfs/scrub/rmap.c
....@@ -9,21 +9,12 @@
99 #include "xfs_format.h"
1010 #include "xfs_trans_resv.h"
1111 #include "xfs_mount.h"
12
-#include "xfs_defer.h"
1312 #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"
2013 #include "xfs_rmap.h"
2114 #include "xfs_refcount.h"
22
-#include "scrub/xfs_scrub.h"
2315 #include "scrub/scrub.h"
2416 #include "scrub/common.h"
2517 #include "scrub/btree.h"
26
-#include "scrub/trace.h"
2718
2819 /*
2920 * Set us up to scrub reverse mapping btrees.
....@@ -101,7 +92,7 @@
10192 {
10293 struct xfs_mount *mp = bs->cur->bc_mp;
10394 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;
10596 bool non_inode;
10697 bool is_unwritten;
10798 bool is_bmbt;
....@@ -174,24 +165,21 @@
174165 xchk_rmapbt(
175166 struct xfs_scrub *sc)
176167 {
177
- struct xfs_owner_info oinfo;
178
-
179
- xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
180168 return xchk_btree(sc, sc->sa.rmap_cur, xchk_rmapbt_rec,
181
- &oinfo, NULL);
169
+ &XFS_RMAP_OINFO_AG, NULL);
182170 }
183171
184172 /* xref check that the extent is owned by a given owner */
185173 static inline void
186174 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)
192180 {
193
- bool has_rmap;
194
- int error;
181
+ bool has_rmap;
182
+ int error;
195183
196184 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm))
197185 return;
....@@ -207,10 +195,10 @@
207195 /* xref check that the extent is owned by a given owner */
208196 void
209197 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)
214202 {
215203 xchk_xref_check_owner(sc, bno, len, oinfo, true);
216204 }
....@@ -218,10 +206,10 @@
218206 /* xref check that the extent is not owned by a given owner */
219207 void
220208 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)
225213 {
226214 xchk_xref_check_owner(sc, bno, len, oinfo, false);
227215 }