Lines Matching defs:rmap

47  * This algorithm is "borrowed" from xfs_repair.  Imagine the rmap
61 * For our purposes, a rmap is a tuple (startblock, len, fileoff, owner).
69 * the extra tree to save time. Also there's no guarantee that rmap
78 * - Set sp to the physical block (pblk) of the next unprocessed rmap.
81 * is the minimum of (the pblk of the next unprocessed rmap) and
82 * (startblock + len of each rmap in the bag).
94 * This is the minimum of (the pblk of the next unprocessed rmap)
95 * and (startblock + len of each rmap in the bag).
129 descr = xchk_xfile_ag_descr(sc, "rmap record bag");
207 /* Decide if an rmap could describe a shared extent. */
211 const struct xfs_rmap_irec *rmap)
214 if (XFS_RMAP_NON_INODE_OWNER(rmap->rm_owner))
218 if (xfs_internal_inum(mp, rmap->rm_owner))
222 if (rmap->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK |
236 struct xfs_rmap_irec *rmap,
250 * keep looping until we find an rmap for one.
262 error = xfs_rmap_get_rec(cur, rmap, &have_gt);
270 if (rmap->rm_owner == XFS_RMAP_OWN_COW) {
271 error = xrep_refc_stash_cow(rr, rmap->rm_startblock,
272 rmap->rm_blockcount);
275 } else if (rmap->rm_owner == XFS_RMAP_OWN_REFC) {
277 rr->btblocks += rmap->rm_blockcount;
279 rmap->rm_startblock,
280 rmap->rm_blockcount);
284 } while (!xrep_refc_rmap_shareable(mp, rmap));
368 * Walk forward through the rmap btree to collect all rmaps starting at
370 * the current block. Upon return, the rmap cursor points to the last record
378 struct xfs_rmap_irec *rmap,
385 while (*have && rmap->rm_startblock == bno) {
386 error = rcbag_add(rcstack, rr->sc->tp, rmap);
390 error = xrep_refc_walk_rmaps(rr, rmap, have);
406 /* Iterate all the rmap records to generate reference count data. */
423 * Set up a bag to store all the rmap records that we're tracking to
438 struct xfs_rmap_irec rmap;
441 error = xrep_refc_walk_rmaps(rr, &rmap, &have);
446 sbno = cbno = rmap.rm_startblock;
447 error = xrep_refc_push_rmaps_at(rr, rcstack, sbno, &rmap,
453 error = rcbag_next_edge(rcstack, sc->tp, &rmap, have, &nbno);
468 error = xrep_refc_walk_rmaps(rr, &rmap, &have);
473 nbno, &rmap, &have);
492 /* Stack empty, go find the next rmap */
499 error = rcbag_next_edge(rcstack, sc->tp, &rmap, have,