Lines Matching refs:ra
468 struct xrep_agfl *ra = priv; in xrep_agfl_walk_rmap() local
472 if (xchk_should_terminate(ra->sc, &error)) in xrep_agfl_walk_rmap()
479 error = xbitmap_set(ra->freesp, fsb, rec->rm_blockcount); in xrep_agfl_walk_rmap()
484 return xbitmap_set_btcur_path(&ra->agmetablocks, cur); in xrep_agfl_walk_rmap()
490 struct xrep_agfl *ra, in xrep_agfl_check_extent() argument
494 xfs_agblock_t agbno = XFS_FSB_TO_AGBNO(ra->sc->mp, start); in xrep_agfl_check_extent()
498 ASSERT(XFS_FSB_TO_AGNO(ra->sc->mp, start) == ra->sc->sa.pag->pag_agno); in xrep_agfl_check_extent()
503 error = xfs_rmap_has_other_keys(ra->rmap_cur, agbno, 1, in xrep_agfl_check_extent()
509 error = xbitmap_set(&ra->crossed, agbno, 1); in xrep_agfl_check_extent()
514 if (xchk_should_terminate(ra->sc, &error)) in xrep_agfl_check_extent()
538 struct xrep_agfl ra; in xrep_agfl_collect_blocks() local
544 ra.sc = sc; in xrep_agfl_collect_blocks()
545 ra.freesp = agfl_extents; in xrep_agfl_collect_blocks()
546 xbitmap_init(&ra.agmetablocks); in xrep_agfl_collect_blocks()
547 xbitmap_init(&ra.crossed); in xrep_agfl_collect_blocks()
551 error = xfs_rmap_query_all(cur, xrep_agfl_walk_rmap, &ra); in xrep_agfl_collect_blocks()
559 error = xbitmap_set_btblocks(&ra.agmetablocks, cur); in xrep_agfl_collect_blocks()
567 error = xbitmap_set_btblocks(&ra.agmetablocks, cur); in xrep_agfl_collect_blocks()
576 error = xbitmap_disunion(agfl_extents, &ra.agmetablocks); in xrep_agfl_collect_blocks()
581 ra.rmap_cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag); in xrep_agfl_collect_blocks()
583 error = xrep_agfl_check_extent(&ra, br->start, br->len); in xrep_agfl_collect_blocks()
587 xfs_btree_del_cursor(ra.rmap_cur, error); in xrep_agfl_collect_blocks()
590 error = xbitmap_disunion(agfl_extents, &ra.crossed); in xrep_agfl_collect_blocks()
602 xbitmap_destroy(&ra.crossed); in xrep_agfl_collect_blocks()
603 xbitmap_destroy(&ra.agmetablocks); in xrep_agfl_collect_blocks()