Lines Matching refs:bs
101 struct xchk_btree *bs, in xchk_iallocbt_chunk() argument
106 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_chunk()
107 xfs_agnumber_t agno = bs->cur->bc_ag.pag->pag_agno; in xchk_iallocbt_chunk()
114 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_chunk()
116 xchk_iallocbt_chunk_xref(bs->sc, irec, agino, bno, len); in xchk_iallocbt_chunk()
146 struct xchk_btree *bs, in xchk_iallocbt_check_cluster_ifree() argument
151 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster_ifree()
159 if (xchk_should_terminate(bs->sc, &error)) in xchk_iallocbt_check_cluster_ifree()
167 fsino = XFS_AGINO_TO_INO(mp, bs->cur->bc_ag.pag->pag_agno, agino); in xchk_iallocbt_check_cluster_ifree()
172 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
176 error = xfs_icache_inode_is_allocated(mp, bs->cur->bc_tp, fsino, in xchk_iallocbt_check_cluster_ifree()
181 if (!(bs->sc->flags & XCHK_TRY_HARDER) && !freemask_ok) in xchk_iallocbt_check_cluster_ifree()
195 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
209 struct xchk_btree *bs, in xchk_iallocbt_check_cluster() argument
214 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster()
217 xfs_agnumber_t agno = bs->cur->bc_ag.pag->pag_agno; in xchk_iallocbt_check_cluster()
252 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
264 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
270 xchk_xref_is_not_owned_by(bs->sc, agbno, in xchk_iallocbt_check_cluster()
276 xchk_xref_is_owned_by(bs->sc, agbno, M_IGEO(mp)->blocks_per_cluster, in xchk_iallocbt_check_cluster()
280 error = xfs_imap_to_bp(mp, bs->cur->bc_tp, &imap, &cluster_bp); in xchk_iallocbt_check_cluster()
281 if (!xchk_btree_xref_process_error(bs->sc, bs->cur, 0, &error)) in xchk_iallocbt_check_cluster()
289 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
294 error = xchk_iallocbt_check_cluster_ifree(bs, irec, in xchk_iallocbt_check_cluster()
301 xfs_trans_brelse(bs->cur->bc_tp, cluster_bp); in xchk_iallocbt_check_cluster()
312 struct xchk_btree *bs, in xchk_iallocbt_check_clusters() argument
327 cluster_base += M_IGEO(bs->sc->mp)->inodes_per_cluster) { in xchk_iallocbt_check_clusters()
328 error = xchk_iallocbt_check_cluster(bs, irec, cluster_base); in xchk_iallocbt_check_clusters()
344 struct xchk_btree *bs, in xchk_iallocbt_rec_alignment() argument
347 struct xfs_mount *mp = bs->sc->mp; in xchk_iallocbt_rec_alignment()
348 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec_alignment()
363 if (bs->cur->bc_btnum == XFS_BTNUM_FINO) { in xchk_iallocbt_rec_alignment()
369 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
380 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
396 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
401 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
420 struct xchk_btree *bs, in xchk_iallocbt_rec() argument
423 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_rec()
424 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec()
427 xfs_agnumber_t agno = bs->cur->bc_ag.pag->pag_agno; in xchk_iallocbt_rec()
440 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
445 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
451 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
455 xchk_iallocbt_rec_alignment(bs, &irec); in xchk_iallocbt_rec()
456 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec()
466 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
468 if (!xchk_iallocbt_chunk(bs, &irec, agino, len)) in xchk_iallocbt_rec()
481 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
486 else if (!xchk_iallocbt_chunk(bs, &irec, agino, len)) in xchk_iallocbt_rec()
494 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
497 error = xchk_iallocbt_check_clusters(bs, &irec); in xchk_iallocbt_rec()