mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
xfs: check that the rtrefcount maxlevels doesn't increase when growing fs
The size of filesystem transaction reservations depends on the maximum height (maxlevels) of the realtime btrees. Since we don't want a grow operation to increase the reservation size enough that we'll fail the minimum log size checks on the next mount, constrain growfs operations if they would cause an increase in the rt refcount btree maxlevels. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
8e84e8052b
commit
88a70768df
|
@ -23,6 +23,7 @@
|
|||
#include "xfs_trace.h"
|
||||
#include "xfs_rtalloc.h"
|
||||
#include "xfs_rtrmap_btree.h"
|
||||
#include "xfs_rtrefcount_btree.h"
|
||||
|
||||
/*
|
||||
* Write new AG headers to disk. Non-transactional, but need to be
|
||||
|
@ -231,6 +232,7 @@ xfs_growfs_data_private(
|
|||
|
||||
/* Compute new maxlevels for rt btrees. */
|
||||
xfs_rtrmapbt_compute_maxlevels(mp);
|
||||
xfs_rtrefcountbt_compute_maxlevels(mp);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
|
|
@ -995,6 +995,7 @@ xfs_growfs_rt_bmblock(
|
|||
*/
|
||||
mp->m_features |= XFS_FEAT_REALTIME;
|
||||
xfs_rtrmapbt_compute_maxlevels(mp);
|
||||
xfs_rtrefcountbt_compute_maxlevels(mp);
|
||||
|
||||
kfree(nmp);
|
||||
return 0;
|
||||
|
@ -1178,6 +1179,7 @@ xfs_growfs_check_rtgeom(
|
|||
nmp->m_sb.sb_dblocks = dblocks;
|
||||
|
||||
xfs_rtrmapbt_compute_maxlevels(nmp);
|
||||
xfs_rtrefcountbt_compute_maxlevels(nmp);
|
||||
xfs_trans_resv_calc(nmp, M_RES(nmp));
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user