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 struct xfs_perag *pag = bs->cur->bc_ag.pag; in xchk_iallocbt_chunk()
113 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_chunk()
115 xchk_iallocbt_chunk_xref(bs->sc, irec, agino, bno, len); in xchk_iallocbt_chunk()
145 struct xchk_btree *bs, in xchk_iallocbt_check_cluster_ifree() argument
150 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster_ifree()
158 if (xchk_should_terminate(bs->sc, &error)) in xchk_iallocbt_check_cluster_ifree()
166 fsino = XFS_AGINO_TO_INO(mp, bs->cur->bc_ag.pag->pag_agno, agino); in xchk_iallocbt_check_cluster_ifree()
171 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
175 error = xfs_icache_inode_is_allocated(mp, bs->cur->bc_tp, fsino, in xchk_iallocbt_check_cluster_ifree()
180 if (!(bs->sc->flags & XCHK_TRY_HARDER) && !freemask_ok) in xchk_iallocbt_check_cluster_ifree()
194 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
208 struct xchk_btree *bs, in xchk_iallocbt_check_cluster() argument
213 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster()
216 xfs_agnumber_t agno = bs->cur->bc_ag.pag->pag_agno; in xchk_iallocbt_check_cluster()
251 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
263 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
269 xchk_xref_is_not_owned_by(bs->sc, agbno, in xchk_iallocbt_check_cluster()
275 xchk_xref_is_owned_by(bs->sc, agbno, M_IGEO(mp)->blocks_per_cluster, in xchk_iallocbt_check_cluster()
279 error = xfs_imap_to_bp(mp, bs->cur->bc_tp, &imap, &cluster_bp); in xchk_iallocbt_check_cluster()
280 if (!xchk_btree_xref_process_error(bs->sc, bs->cur, 0, &error)) in xchk_iallocbt_check_cluster()
288 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
293 error = xchk_iallocbt_check_cluster_ifree(bs, irec, in xchk_iallocbt_check_cluster()
300 xfs_trans_brelse(bs->cur->bc_tp, cluster_bp); in xchk_iallocbt_check_cluster()
311 struct xchk_btree *bs, in xchk_iallocbt_check_clusters() argument
326 cluster_base += M_IGEO(bs->sc->mp)->inodes_per_cluster) { in xchk_iallocbt_check_clusters()
327 error = xchk_iallocbt_check_cluster(bs, irec, cluster_base); in xchk_iallocbt_check_clusters()
343 struct xchk_btree *bs, in xchk_iallocbt_rec_alignment() argument
346 struct xfs_mount *mp = bs->sc->mp; in xchk_iallocbt_rec_alignment()
347 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec_alignment()
362 if (bs->cur->bc_btnum == XFS_BTNUM_FINO) { in xchk_iallocbt_rec_alignment()
368 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
379 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
395 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
400 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
419 struct xchk_btree *bs, in xchk_iallocbt_rec() argument
422 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_rec()
423 struct xfs_perag *pag = bs->cur->bc_ag.pag; in xchk_iallocbt_rec()
424 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec()
439 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
444 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
450 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
454 xchk_iallocbt_rec_alignment(bs, &irec); in xchk_iallocbt_rec()
455 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec()
465 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
467 if (!xchk_iallocbt_chunk(bs, &irec, agino, len)) in xchk_iallocbt_rec()
480 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
485 else if (!xchk_iallocbt_chunk(bs, &irec, agino, len)) in xchk_iallocbt_rec()
493 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
496 error = xchk_iallocbt_check_clusters(bs, &irec); in xchk_iallocbt_rec()