summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/rtsummary.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/rtsummary.c')
-rw-r--r--fs/xfs/scrub/rtsummary.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/fs/xfs/scrub/rtsummary.c b/fs/xfs/scrub/rtsummary.c
index 3a98391732a0..94976317b630 100644
--- a/fs/xfs/scrub/rtsummary.c
+++ b/fs/xfs/scrub/rtsummary.c
@@ -85,9 +85,10 @@ static inline int
xfsum_load(
struct xfs_scrub *sc,
xfs_rtsumoff_t sumoff,
- xfs_suminfo_t *info)
+ union xfs_suminfo_ondisk *rawinfo)
{
- return xfile_obj_load(sc->xfile, info, sizeof(xfs_suminfo_t),
+ return xfile_obj_load(sc->xfile, rawinfo,
+ sizeof(union xfs_suminfo_ondisk),
sumoff << XFS_WORDLOG);
}
@@ -95,9 +96,10 @@ static inline int
xfsum_store(
struct xfs_scrub *sc,
xfs_rtsumoff_t sumoff,
- const xfs_suminfo_t info)
+ const union xfs_suminfo_ondisk rawinfo)
{
- return xfile_obj_store(sc->xfile, &info, sizeof(xfs_suminfo_t),
+ return xfile_obj_store(sc->xfile, &rawinfo,
+ sizeof(union xfs_suminfo_ondisk),
sumoff << XFS_WORDLOG);
}
@@ -105,10 +107,10 @@ inline int
xfsum_copyout(
struct xfs_scrub *sc,
xfs_rtsumoff_t sumoff,
- xfs_suminfo_t *info,
+ union xfs_suminfo_ondisk *rawinfo,
unsigned int nr_words)
{
- return xfile_obj_load(sc->xfile, info, nr_words << XFS_WORDLOG,
+ return xfile_obj_load(sc->xfile, rawinfo, nr_words << XFS_WORDLOG,
sumoff << XFS_WORDLOG);
}
@@ -126,7 +128,7 @@ xchk_rtsum_record_free(
xfs_filblks_t rtlen;
xfs_rtsumoff_t offs;
unsigned int lenlog;
- xfs_suminfo_t v = 0;
+ union xfs_suminfo_ondisk v;
int error = 0;
if (xchk_should_terminate(sc, &error))
@@ -150,9 +152,9 @@ xchk_rtsum_record_free(
if (error)
return error;
- v++;
+ xfs_suminfo_add(mp, &v, 1);
trace_xchk_rtsum_record_free(mp, rec->ar_startext, rec->ar_extcount,
- lenlog, offs, v);
+ lenlog, offs, &v);
return xfsum_store(sc, offs, v);
}
@@ -187,7 +189,7 @@ xchk_rtsum_compare(
int nmap;
for (off = 0; off < XFS_B_TO_FSB(mp, mp->m_rsumsize); off++) {
- xfs_suminfo_t *ondisk_info;
+ union xfs_suminfo_ondisk *ondisk_info;
int error = 0;
if (xchk_should_terminate(sc, &error))