struct aghdr_init_data  *id,
        xfs_extlen_t            len)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_buf          *bp;
        struct xfs_agi          *agi;
        struct xfs_agf          *agf;
        /*
         * Free the new space.
         *
-        * XFS_RMAP_OWN_NULL is used here to tell the rmap btree that
+        * XFS_RMAP_OINFO_SKIP_UPDATE is used here to tell the rmap btree that
         * this doesn't actually exist in the rmap btree.
         */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_NULL);
        error = xfs_rmap_free(tp, bp, id->agno,
                                be32_to_cpu(agf->agf_length) - len,
-                               len, &oinfo);
+                               len, &XFS_RMAP_OINFO_SKIP_UPDATE);
        if (error)
                return error;
 
        return  xfs_free_extent(tp, XFS_AGB_TO_FSB(mp, id->agno,
                                        be32_to_cpu(agf->agf_length) - len),
-                               len, &oinfo, XFS_AG_RESV_NONE);
+                               len, &XFS_RMAP_OINFO_SKIP_UPDATE,
+                               XFS_AG_RESV_NONE);
 }
 
        xfs_extlen_t    *flenp, /* result length */
        int             *stat)  /* status: 0-freelist, 1-normal/none */
 {
-       struct xfs_owner_info   oinfo;
        int             error;
        xfs_agblock_t   fbno;
        xfs_extlen_t    flen;
                         * doesn't live in the free space, we need to clear
                         * out the OWN_AG rmap.
                         */
-                       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
                        error = xfs_rmap_free(args->tp, args->agbp, args->agno,
-                                       fbno, 1, &oinfo);
+                                       fbno, 1, &XFS_RMAP_OINFO_AG);
                        if (error)
                                goto error0;
 
         * repair/rmap.c in xfsprogs for details.
         */
        memset(&targs, 0, sizeof(targs));
+       /* struct copy below */
        if (flags & XFS_ALLOC_FLAG_NORMAP)
-               xfs_rmap_skip_owner_update(&targs.oinfo);
+               targs.oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
        else
-               xfs_rmap_ag_owner(&targs.oinfo, XFS_RMAP_OWN_AG);
+               targs.oinfo = XFS_RMAP_OINFO_AG;
        while (!(flags & XFS_ALLOC_FLAG_NOSHRINK) && pag->pagf_flcount > need) {
                error = xfs_alloc_get_freelist(tp, agbp, &bno, 0);
                if (error)
 
        if (oinfo)
                new->xefi_oinfo = *oinfo;
        else
-               xfs_rmap_skip_owner_update(&new->xefi_oinfo);
+               new->xefi_oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
        new->xefi_skip_discard = skip_discard;
        trace_xfs_bmap_free_defer(tp->t_mountp,
                        XFS_FSB_TO_AGNO(tp->t_mountp, bno), 0,
        args.tp = ap->tp;
        args.mp = mp;
        args.fsbno = ap->blkno;
-       xfs_rmap_skip_owner_update(&args.oinfo);
+       args.oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
 
        /* Trim the allocation back to the maximum an AG can fit. */
        args.maxlen = min(ap->length, mp->m_ag_max_usable);
 
        args.tp = tp;
        args.mp = tp->t_mountp;
        args.fsbno = NULLFSBLOCK;
-       xfs_rmap_ag_owner(&args.oinfo, XFS_RMAP_OWN_INODES);
+       args.oinfo = XFS_RMAP_OINFO_INODES;
 
 #ifdef DEBUG
        /* randomly do sparse inode allocations */
        int                             nextbit;
        xfs_agblock_t                   agbno;
        int                             contigblk;
-       struct xfs_owner_info           oinfo;
        DECLARE_BITMAP(holemask, XFS_INOBT_HOLEMASK_BITS);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
 
        if (!xfs_inobt_issparse(rec->ir_holemask)) {
                /* not sparse, calculate extent info directly */
                xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, sagbno),
-                                 mp->m_ialloc_blks, &oinfo);
+                                 mp->m_ialloc_blks, &XFS_RMAP_OINFO_INODES);
                return;
        }
 
                ASSERT(agbno % mp->m_sb.sb_spino_align == 0);
                ASSERT(contigblk % mp->m_sb.sb_spino_align == 0);
                xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, agbno),
-                                 contigblk, &oinfo);
+                                 contigblk, &XFS_RMAP_OINFO_INODES);
 
                /* reset range to current bit and carry on... */
                startidx = endidx = nextbit;
 
        memset(&args, 0, sizeof(args));
        args.tp = cur->bc_tp;
        args.mp = cur->bc_mp;
-       xfs_rmap_ag_owner(&args.oinfo, XFS_RMAP_OWN_INOBT);
+       args.oinfo = XFS_RMAP_OINFO_INOBT;
        args.fsbno = XFS_AGB_TO_FSB(args.mp, cur->bc_private.a.agno, sbno);
        args.minlen = 1;
        args.maxlen = 1;
        struct xfs_buf          *bp,
        enum xfs_ag_resv_type   resv)
 {
-       struct xfs_owner_info   oinfo;
-
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INOBT);
        return xfs_free_extent(cur->bc_tp,
                        XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1,
-                       &oinfo, resv);
+                       &XFS_RMAP_OINFO_INOBT, resv);
 }
 
 STATIC int
 
        args.type = XFS_ALLOCTYPE_NEAR_BNO;
        args.fsbno = XFS_AGB_TO_FSB(cur->bc_mp, cur->bc_private.a.agno,
                        xfs_refc_block(args.mp));
-       xfs_rmap_ag_owner(&args.oinfo, XFS_RMAP_OWN_REFC);
+       args.oinfo = XFS_RMAP_OINFO_REFC;
        args.minlen = args.maxlen = args.prod = 1;
        args.resv = XFS_AG_RESV_METADATA;
 
        struct xfs_buf          *agbp = cur->bc_private.a.agbp;
        struct xfs_agf          *agf = XFS_BUF_TO_AGF(agbp);
        xfs_fsblock_t           fsbno = XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(bp));
-       struct xfs_owner_info   oinfo;
        int                     error;
 
        trace_xfs_refcountbt_free_block(cur->bc_mp, cur->bc_private.a.agno,
                        XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno), 1);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_REFC);
        be32_add_cpu(&agf->agf_refcount_blocks, -1);
        xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS);
-       error = xfs_free_extent(cur->bc_tp, fsbno, 1, &oinfo,
+       error = xfs_free_extent(cur->bc_tp, fsbno, 1, &XFS_RMAP_OINFO_REFC,
                        XFS_AG_RESV_METADATA);
        if (error)
                return error;
 
        *has_rmap = rks.has_rmap;
        return error;
 }
+
+const struct xfs_owner_info XFS_RMAP_OINFO_SKIP_UPDATE = {
+       .oi_owner = XFS_RMAP_OWN_NULL,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_ANY_OWNER = {
+       .oi_owner = XFS_RMAP_OWN_UNKNOWN,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_FS = {
+       .oi_owner = XFS_RMAP_OWN_FS,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_LOG = {
+       .oi_owner = XFS_RMAP_OWN_LOG,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_AG = {
+       .oi_owner = XFS_RMAP_OWN_AG,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_INOBT = {
+       .oi_owner = XFS_RMAP_OWN_INOBT,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_INODES = {
+       .oi_owner = XFS_RMAP_OWN_INODES,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_REFC = {
+       .oi_owner = XFS_RMAP_OWN_REFC,
+};
+const struct xfs_owner_info XFS_RMAP_OINFO_COW = {
+       .oi_owner = XFS_RMAP_OWN_COW,
+};
 
 #ifndef __XFS_RMAP_H__
 #define __XFS_RMAP_H__
 
-static inline void
-xfs_rmap_ag_owner(
-       struct xfs_owner_info   *oi,
-       uint64_t                owner)
-{
-       oi->oi_owner = owner;
-       oi->oi_offset = 0;
-       oi->oi_flags = 0;
-}
-
 static inline void
 xfs_rmap_ino_bmbt_owner(
        struct xfs_owner_info   *oi,
                oi->oi_flags |= XFS_OWNER_INFO_ATTR_FORK;
 }
 
-static inline void
-xfs_rmap_skip_owner_update(
-       struct xfs_owner_info   *oi)
-{
-       xfs_rmap_ag_owner(oi, XFS_RMAP_OWN_NULL);
-}
-
 static inline bool
 xfs_rmap_should_skip_owner_update(
        const struct xfs_owner_info     *oi)
        return oi->oi_owner == XFS_RMAP_OWN_NULL;
 }
 
-static inline void
-xfs_rmap_any_owner_update(
-       struct xfs_owner_info   *oi)
-{
-       xfs_rmap_ag_owner(oi, XFS_RMAP_OWN_UNKNOWN);
-}
-
 /* Reverse mapping functions. */
 
 struct xfs_buf;
                bool *has_rmap);
 int xfs_rmap_map_raw(struct xfs_btree_cur *cur, struct xfs_rmap_irec *rmap);
 
+extern const struct xfs_owner_info XFS_RMAP_OINFO_SKIP_UPDATE;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_ANY_OWNER;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_FS;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_LOG;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_AG;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_INOBT;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_INODES;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_REFC;
+extern const struct xfs_owner_info XFS_RMAP_OINFO_COW;
+
 #endif /* __XFS_RMAP_H__ */
 
        struct xfs_scrub        *sc,
        struct xfs_buf          *bp)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_mount        *mp = sc->mp;
        xfs_agnumber_t          agno = sc->sm->sm_agno;
        xfs_agblock_t           agbno;
 
        xchk_xref_is_used_space(sc, agbno, 1);
        xchk_xref_is_not_inode_chunk(sc, agbno, 1);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_FS);
-       xchk_xref_is_owned_by(sc, agbno, 1, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_FS);
        xchk_xref_is_not_shared(sc, agbno, 1);
 
        /* scrub teardown will take care of sc->sa for us */
 xchk_agf_xref(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_mount        *mp = sc->mp;
        xfs_agblock_t           agbno;
        int                     error;
        xchk_agf_xref_freeblks(sc);
        xchk_agf_xref_cntbt(sc);
        xchk_xref_is_not_inode_chunk(sc, agbno, 1);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_FS);
-       xchk_xref_is_owned_by(sc, agbno, 1, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_FS);
        xchk_agf_xref_btreeblks(sc);
        xchk_xref_is_not_shared(sc, agbno, 1);
        xchk_agf_xref_refcblks(sc);
 /* AGFL */
 
 struct xchk_agfl_info {
-       struct xfs_owner_info   oinfo;
        unsigned int            sz_entries;
        unsigned int            nr_entries;
        xfs_agblock_t           *entries;
 STATIC void
 xchk_agfl_block_xref(
        struct xfs_scrub        *sc,
-       xfs_agblock_t           agbno,
-       struct xfs_owner_info   *oinfo)
+       xfs_agblock_t           agbno)
 {
        if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
                return;
 
        xchk_xref_is_used_space(sc, agbno, 1);
        xchk_xref_is_not_inode_chunk(sc, agbno, 1);
-       xchk_xref_is_owned_by(sc, agbno, 1, oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_AG);
        xchk_xref_is_not_shared(sc, agbno, 1);
 }
 
        else
                xchk_block_set_corrupt(sc, sc->sa.agfl_bp);
 
-       xchk_agfl_block_xref(sc, agbno, priv);
+       xchk_agfl_block_xref(sc, agbno);
 
        if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
                return XFS_BTREE_QUERY_RANGE_ABORT;
 xchk_agfl_xref(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_mount        *mp = sc->mp;
        xfs_agblock_t           agbno;
        int                     error;
 
        xchk_xref_is_used_space(sc, agbno, 1);
        xchk_xref_is_not_inode_chunk(sc, agbno, 1);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_FS);
-       xchk_xref_is_owned_by(sc, agbno, 1, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_FS);
        xchk_xref_is_not_shared(sc, agbno, 1);
 
        /*
        }
 
        /* Check the blocks in the AGFL. */
-       xfs_rmap_ag_owner(&sai.oinfo, XFS_RMAP_OWN_AG);
        error = xfs_agfl_walk(sc->mp, XFS_BUF_TO_AGF(sc->sa.agf_bp),
                        sc->sa.agfl_bp, xchk_agfl_block, &sai);
        if (error == XFS_BTREE_QUERY_RANGE_ABORT) {
 xchk_agi_xref(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_mount        *mp = sc->mp;
        xfs_agblock_t           agbno;
        int                     error;
        xchk_xref_is_used_space(sc, agbno, 1);
        xchk_xref_is_not_inode_chunk(sc, agbno, 1);
        xchk_agi_xref_icounts(sc);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_FS);
-       xchk_xref_is_owned_by(sc, agbno, 1, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_FS);
        xchk_xref_is_not_shared(sc, agbno, 1);
 
        /* scrub teardown will take care of sc->sa for us */
 
 xrep_agfl(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_bitmap       agfl_extents;
        struct xfs_mount        *mp = sc->mp;
        struct xfs_buf          *agf_bp;
                goto err;
 
        /* Dump any AGFL overflow. */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
-       return xrep_reap_extents(sc, &agfl_extents, &oinfo, XFS_AG_RESV_AGFL);
+       return xrep_reap_extents(sc, &agfl_extents, &XFS_RMAP_OINFO_AG,
+                       XFS_AG_RESV_AGFL);
 err:
        xfs_bitmap_destroy(&agfl_extents);
        return error;
 
        struct xfs_scrub        *sc,
        xfs_btnum_t             which)
 {
-       struct xfs_owner_info   oinfo;
        struct xfs_btree_cur    *cur;
 
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
        cur = which == XFS_BTNUM_BNO ? sc->sa.bno_cur : sc->sa.cnt_cur;
-       return xchk_btree(sc, cur, xchk_allocbt_rec, &oinfo, NULL);
+       return xchk_btree(sc, cur, xchk_allocbt_rec, &XFS_RMAP_OINFO_AG, NULL);
 }
 
 int
 
        xfs_agblock_t                   agbno,
        xfs_extlen_t                    len)
 {
-       struct xfs_owner_info           oinfo;
-
        if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
                return;
 
        xchk_xref_is_used_space(sc, agbno, len);
        xchk_iallocbt_chunk_xref_other(sc, irec, agino);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
-       xchk_xref_is_owned_by(sc, agbno, len, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, len, &XFS_RMAP_OINFO_INODES);
        xchk_xref_is_not_shared(sc, agbno, len);
 }
 
        struct xchk_btree               *bs,
        struct xfs_inobt_rec_incore     *irec)
 {
-       struct xfs_owner_info           oinfo;
        struct xfs_imap                 imap;
        struct xfs_mount                *mp = bs->cur->bc_mp;
        struct xfs_dinode               *dip;
        /* Make sure the freemask matches the inode records. */
        blks_per_cluster = xfs_icluster_size_fsb(mp);
        nr_inodes = XFS_OFFBNO_TO_AGINO(mp, blks_per_cluster, 0);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
 
        for (agino = irec->ir_startino;
             agino < irec->ir_startino + XFS_INODES_PER_CHUNK;
                /* If any part of this is a hole, skip it. */
                if (ir_holemask) {
                        xchk_xref_is_not_owned_by(bs->sc, agbno,
-                                       blks_per_cluster, &oinfo);
+                                       blks_per_cluster,
+                                       &XFS_RMAP_OINFO_INODES);
                        continue;
                }
 
                xchk_xref_is_owned_by(bs->sc, agbno, blks_per_cluster,
-                               &oinfo);
+                               &XFS_RMAP_OINFO_INODES);
 
                /* Grab the inode cluster buffer. */
                imap.im_blkno = XFS_AGB_TO_DADDR(mp, bs->cur->bc_private.a.agno,
        struct xfs_scrub        *sc,
        int                     which)
 {
-       struct xfs_owner_info   oinfo;
        xfs_filblks_t           blocks;
        xfs_extlen_t            inobt_blocks = 0;
        xfs_extlen_t            finobt_blocks = 0;
                        return;
        }
 
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INOBT);
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
-                       &blocks);
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur,
+                       &XFS_RMAP_OINFO_INOBT, &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
        if (blocks != inobt_blocks + finobt_blocks)
        int                     which,
        xfs_filblks_t           inode_blocks)
 {
-       struct xfs_owner_info   oinfo;
        xfs_filblks_t           blocks;
        int                     error;
 
                return;
 
        /* Check that we saw as many inode blocks as the rmap knows about. */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
-                       &blocks);
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur,
+                       &XFS_RMAP_OINFO_INODES, &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
        if (blocks != inode_blocks)
        xfs_btnum_t             which)
 {
        struct xfs_btree_cur    *cur;
-       struct xfs_owner_info   oinfo;
        xfs_filblks_t           inode_blocks = 0;
        int                     error;
 
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INOBT);
        cur = which == XFS_BTNUM_INO ? sc->sa.ino_cur : sc->sa.fino_cur;
-       error = xchk_btree(sc, cur, xchk_iallocbt_rec, &oinfo,
+       error = xchk_btree(sc, cur, xchk_iallocbt_rec, &XFS_RMAP_OINFO_INOBT,
                        &inode_blocks);
        if (error)
                return error;
 
        xfs_ino_t               ino,
        struct xfs_dinode       *dip)
 {
-       struct xfs_owner_info   oinfo;
        xfs_agnumber_t          agno;
        xfs_agblock_t           agbno;
        int                     error;
 
        xchk_xref_is_used_space(sc, agbno, 1);
        xchk_inode_xref_finobt(sc, ino);
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
-       xchk_xref_is_owned_by(sc, agbno, 1, &oinfo);
+       xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_INODES);
        xchk_xref_is_not_shared(sc, agbno, 1);
        xchk_inode_xref_bmap(sc, dip);
 
 
        struct xfs_scrub        *sc,
        xfs_filblks_t           cow_blocks)
 {
-       struct xfs_owner_info   oinfo;
        xfs_extlen_t            refcbt_blocks = 0;
        xfs_filblks_t           blocks;
        int                     error;
                return;
 
        /* Check that we saw as many refcbt blocks as the rmap knows about. */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_REFC);
        error = xfs_btree_count_blocks(sc->sa.refc_cur, &refcbt_blocks);
        if (!xchk_btree_process_error(sc, sc->sa.refc_cur, 0, &error))
                return;
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
-                       &blocks);
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur,
+                       &XFS_RMAP_OINFO_REFC, &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
        if (blocks != refcbt_blocks)
                xchk_btree_xref_set_corrupt(sc, sc->sa.rmap_cur, 0);
 
        /* Check that we saw as many cow blocks as the rmap knows about. */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_COW);
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
-                       &blocks);
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur,
+                       &XFS_RMAP_OINFO_COW, &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
        if (blocks != cow_blocks)
 xchk_refcountbt(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
        xfs_agblock_t           cow_blocks = 0;
        int                     error;
 
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_REFC);
        error = xchk_btree(sc, sc->sa.refc_cur, xchk_refcountbt_rec,
-                       &oinfo, &cow_blocks);
+                       &XFS_RMAP_OINFO_REFC, &cow_blocks);
        if (error)
                return error;
 
 
        struct xfs_scrub        *sc,
        xfs_agblock_t           agbno)
 {
-       struct xfs_owner_info   oinfo;
        int                     error;
 
        /* Make sure there's space on the freelist. */
         * create an rmap for the block prior to merging it or else other
         * parts will break.
         */
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
        error = xfs_rmap_alloc(sc->tp, sc->sa.agf_bp, sc->sa.agno, agbno, 1,
-                       &oinfo);
+                       &XFS_RMAP_OINFO_AG);
        if (error)
                return error;
 
 
 xchk_rmapbt(
        struct xfs_scrub        *sc)
 {
-       struct xfs_owner_info   oinfo;
-
-       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
        return xchk_btree(sc, sc->sa.rmap_cur, xchk_rmapbt_rec,
-                       &oinfo, NULL);
+                       &XFS_RMAP_OINFO_AG, NULL);
 }
 
 /* xref check that the extent is owned by a given owner */
 
        int                     error = 0;
        xfs_extent_t            *extp;
        xfs_fsblock_t           startblock_fsb;
-       struct xfs_owner_info   oinfo;
 
        ASSERT(!test_bit(XFS_EFI_RECOVERED, &efip->efi_flags));
 
                return error;
        efdp = xfs_trans_get_efd(tp, efip, efip->efi_format.efi_nextents);
 
-       xfs_rmap_any_owner_update(&oinfo);
        for (i = 0; i < efip->efi_format.efi_nextents; i++) {
                extp = &efip->efi_format.efi_extents[i];
                error = xfs_trans_free_extent(tp, efdp, extp->ext_start,
-                                             extp->ext_len, &oinfo, false);
+                                             extp->ext_len,
+                                             &XFS_RMAP_OINFO_ANY_OWNER, false);
                if (error)
                        goto abort_error;