@@ -81,7 +81,7 @@ typedef unsigned int xchk_rtsumoff_t;
8181static inline int
8282xfsum_load (
8383 struct xfs_scrub * sc ,
84- xchk_rtsumoff_t sumoff ,
84+ xfs_rtsumoff_t sumoff ,
8585 xfs_suminfo_t * info )
8686{
8787 return xfile_obj_load (sc -> xfile , info , sizeof (xfs_suminfo_t ),
@@ -91,7 +91,7 @@ xfsum_load(
9191static inline int
9292xfsum_store (
9393 struct xfs_scrub * sc ,
94- xchk_rtsumoff_t sumoff ,
94+ xfs_rtsumoff_t sumoff ,
9595 const xfs_suminfo_t info )
9696{
9797 return xfile_obj_store (sc -> xfile , & info , sizeof (xfs_suminfo_t ),
@@ -101,7 +101,7 @@ xfsum_store(
101101static inline int
102102xfsum_copyout (
103103 struct xfs_scrub * sc ,
104- xchk_rtsumoff_t sumoff ,
104+ xfs_rtsumoff_t sumoff ,
105105 xfs_suminfo_t * info ,
106106 unsigned int nr_words )
107107{
@@ -121,7 +121,7 @@ xchk_rtsum_record_free(
121121 xfs_fileoff_t rbmoff ;
122122 xfs_rtblock_t rtbno ;
123123 xfs_filblks_t rtlen ;
124- xchk_rtsumoff_t offs ;
124+ xfs_rtsumoff_t offs ;
125125 unsigned int lenlog ;
126126 xfs_suminfo_t v = 0 ;
127127 int error = 0 ;
@@ -132,7 +132,7 @@ xchk_rtsum_record_free(
132132 /* Compute the relevant location in the rtsum file. */
133133 rbmoff = xfs_rtx_to_rbmblock (mp , rec -> ar_startext );
134134 lenlog = XFS_RTBLOCKLOG (rec -> ar_extcount );
135- offs = XFS_SUMOFFS (mp , lenlog , rbmoff );
135+ offs = xfs_rtsumoffs (mp , lenlog , rbmoff );
136136
137137 rtbno = xfs_rtx_to_rtb (mp , rec -> ar_startext );
138138 rtlen = xfs_rtx_to_rtb (mp , rec -> ar_extcount );
@@ -185,6 +185,7 @@ xchk_rtsum_compare(
185185 int nmap ;
186186
187187 for (off = 0 ; off < XFS_B_TO_FSB (mp , mp -> m_rsumsize ); off ++ ) {
188+ xfs_suminfo_t * ondisk_info ;
188189 int error = 0 ;
189190
190191 if (xchk_should_terminate (sc , & error ))
@@ -216,7 +217,8 @@ xchk_rtsum_compare(
216217 return error ;
217218 }
218219
219- if (memcmp (bp -> b_addr , sc -> buf ,
220+ ondisk_info = xfs_rsumblock_infoptr (bp , 0 );
221+ if (memcmp (ondisk_info , sc -> buf ,
220222 mp -> m_blockwsize << XFS_WORDLOG ) != 0 )
221223 xchk_fblock_set_corrupt (sc , XFS_DATA_FORK , off );
222224
0 commit comments