• Darrick J. Wong's avatar
    xfs: check rt summary file geometry more thoroughly · 04f0c326
    Darrick J. Wong authored
    I forgot that the xfs_mount tracks the size and number of levels in the
    realtime summary file, and that the rt summary file can have more blocks
    mapped to the data fork than m_rsumsize implies if growfsrt fails.
    
    So.  Add to the rtsummary scrubber an explicit check that all the
    summary geometry values are correct, then adjust the rtsummary i_size
    checks to allow for the growfsrt failure case.  Finally, flag post-eof
    blocks in the summary file.
    
    While we're at it, split the extent map checking so that we only call
    xfs_bmapi_read once per extent instead of once per rtsummary block.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    04f0c326
rtsummary.c 9.14 KB