Lines Matching refs:bs

254 	struct xchk_btree		*bs,  in xchk_iallocbt_chunk()  argument
259 struct xfs_scrub *sc = bs->sc; in xchk_iallocbt_chunk()
260 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_chunk()
261 struct xfs_perag *pag = bs->cur->bc_ag.pag; in xchk_iallocbt_chunk()
269 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_chunk()
271 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_chunk()
301 struct xchk_btree *bs, in xchk_iallocbt_check_cluster_ifree() argument
306 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster_ifree()
314 if (xchk_should_terminate(bs->sc, &error)) in xchk_iallocbt_check_cluster_ifree()
322 fsino = XFS_AGINO_TO_INO(mp, bs->cur->bc_ag.pag->pag_agno, agino); in xchk_iallocbt_check_cluster_ifree()
327 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
331 error = xchk_inode_is_allocated(bs->sc, agino, &ino_inuse); in xchk_iallocbt_check_cluster_ifree()
335 if (!(bs->sc->flags & XCHK_TRY_HARDER) && !freemask_ok) in xchk_iallocbt_check_cluster_ifree()
349 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster_ifree()
363 struct xchk_btree *bs, in xchk_iallocbt_check_cluster() argument
368 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_check_cluster()
371 xfs_agnumber_t agno = bs->cur->bc_ag.pag->pag_agno; in xchk_iallocbt_check_cluster()
406 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
418 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
424 xchk_xref_is_not_owned_by(bs->sc, agbno, in xchk_iallocbt_check_cluster()
430 xchk_xref_is_only_owned_by(bs->sc, agbno, M_IGEO(mp)->blocks_per_cluster, in xchk_iallocbt_check_cluster()
434 error = xfs_imap_to_bp(mp, bs->cur->bc_tp, &imap, &cluster_bp); in xchk_iallocbt_check_cluster()
435 if (!xchk_btree_xref_process_error(bs->sc, bs->cur, 0, &error)) in xchk_iallocbt_check_cluster()
443 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_check_cluster()
448 error = xchk_iallocbt_check_cluster_ifree(bs, irec, in xchk_iallocbt_check_cluster()
455 xfs_trans_brelse(bs->cur->bc_tp, cluster_bp); in xchk_iallocbt_check_cluster()
466 struct xchk_btree *bs, in xchk_iallocbt_check_clusters() argument
481 cluster_base += M_IGEO(bs->sc->mp)->inodes_per_cluster) { in xchk_iallocbt_check_clusters()
482 error = xchk_iallocbt_check_cluster(bs, irec, cluster_base); in xchk_iallocbt_check_clusters()
498 struct xchk_btree *bs, in xchk_iallocbt_rec_alignment() argument
501 struct xfs_mount *mp = bs->sc->mp; in xchk_iallocbt_rec_alignment()
502 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec_alignment()
517 if (bs->cur->bc_btnum == XFS_BTNUM_FINO) { in xchk_iallocbt_rec_alignment()
523 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
534 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
550 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
555 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec_alignment()
574 struct xchk_btree *bs, in xchk_iallocbt_rec() argument
577 struct xfs_mount *mp = bs->cur->bc_mp; in xchk_iallocbt_rec()
578 struct xchk_iallocbt *iabt = bs->private; in xchk_iallocbt_rec()
588 if (xfs_inobt_check_irec(bs->cur, &irec) != NULL) { in xchk_iallocbt_rec()
589 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
595 xchk_iallocbt_rec_alignment(bs, &irec); in xchk_iallocbt_rec()
596 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec()
604 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
606 if (!xchk_iallocbt_chunk(bs, &irec, agino, in xchk_iallocbt_rec()
618 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
623 else if (!xchk_iallocbt_chunk(bs, &irec, agino, in xchk_iallocbt_rec()
632 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_iallocbt_rec()
635 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec()
638 error = xchk_iallocbt_check_clusters(bs, &irec); in xchk_iallocbt_rec()