diff options
Diffstat (limited to 'fs/xfs/scrub/rtsummary_repair.c')
-rw-r--r-- | fs/xfs/scrub/rtsummary_repair.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/xfs/scrub/rtsummary_repair.c b/fs/xfs/scrub/rtsummary_repair.c index 713b79a1f52a..0836c1e10504 100644 --- a/fs/xfs/scrub/rtsummary_repair.c +++ b/fs/xfs/scrub/rtsummary_repair.c @@ -88,13 +88,24 @@ xrep_rtsummary_prep_buf( struct xfs_mount *mp = sc->mp; int error; - bp->b_ops = &xfs_rtbuf_ops; - error = xfsum_copyout(sc, rs->prep_wordoff, xfs_rsumblock_infoptr(bp, 0), mp->m_blockwsize); if (error) return error; + if (xfs_has_rtgroups(sc->mp)) { + struct xfs_rtbuf_blkinfo *hdr = bp->b_addr; + + hdr->rt_magic = cpu_to_be32(XFS_RTSUMMARY_MAGIC); + hdr->rt_owner = cpu_to_be64(sc->ip->i_ino); + hdr->rt_blkno = cpu_to_be64(xfs_buf_daddr(bp)); + hdr->rt_lsn = 0; + uuid_copy(&hdr->rt_uuid, &sc->mp->m_sb.sb_meta_uuid); + bp->b_ops = &xfs_rtsummary_buf_ops; + } else { + bp->b_ops = &xfs_rtbuf_ops; + } + rs->prep_wordoff += mp->m_blockwsize; xfs_trans_buf_set_type(sc->tp, bp, XFS_BLFT_RTSUMMARY_BUF); return 0; |