xfs: reallocate realtime summary cache on growfs
authorOmar Sandoval <osandov@fb.com>
Sat, 22 Dec 2018 02:45:18 +0000 (18:45 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 22 Dec 2018 02:45:18 +0000 (18:45 -0800)
commit65eed012d1f2d0f0bf0ffc036826d58147de77b8
treebe3a4f61c0399d64281e776b06778e3a74f28442
parent86d163dbfe2ac0b30fbb6e256301abbfa9e4549e
xfs: reallocate realtime summary cache on growfs

At mount time, we allocate m_rsum_cache with the number of realtime
bitmap blocks. However, xfs_growfs_rt() can increase the number of
realtime bitmap blocks. Using the cache after this happens may access
out of the bounds of the cache. Fix it by reallocating the cache in this
case.

Fixes: 355e3532132b ("xfs: cache minimum realtime summary level")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_rtalloc.c