Commit 2fb94e36 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: rtbitmap scrubber should check inode size

Make sure the rtbitmap is large enough to store the entire bitmap.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarAllison Collins <allison.henderson@oracle.com>
parent f866560b
...@@ -101,6 +101,13 @@ xchk_rtbitmap( ...@@ -101,6 +101,13 @@ xchk_rtbitmap(
{ {
int error; int error;
/* Is the size of the rtbitmap correct? */
if (sc->mp->m_rbmip->i_d.di_size !=
XFS_FSB_TO_B(sc->mp, sc->mp->m_sb.sb_rbmblocks)) {
xchk_ino_set_corrupt(sc, sc->mp->m_rbmip->i_ino);
return 0;
}
/* Invoke the fork scrubber. */ /* Invoke the fork scrubber. */
error = xchk_metadata_inode_forks(sc); error = xchk_metadata_inode_forks(sc);
if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment