diff options
| author | Christoph Hellwig <[email protected]> | 2024-11-04 04:19:29 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-11-05 21:38:42 +0000 |
| commit | d162491c5459f4dd72e65b72a2c864591668ec07 (patch) | |
| tree | eaab16b130ccdb2ed5b62bd1285be87fcec7d85d /fs/xfs/libxfs/xfs_rtbitmap.c | |
| parent | xfs: don't merge ioends across RTGs (diff) | |
| download | kernel-d162491c5459f4dd72e65b72a2c864591668ec07.tar.gz kernel-d162491c5459f4dd72e65b72a2c864591668ec07.zip | |
xfs: make the RT allocator rtgroup aware
Make the allocator rtgroup aware by either picking a specific group if
there is a hint, or loop over all groups otherwise. A simple rotor is
provided to pick the placement for initial allocations.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rtbitmap.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index c73826aa4425..5abfd84852ce 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c @@ -1084,11 +1084,13 @@ xfs_rtfree_extent( * Mark more blocks free in the superblock. */ xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS, (long)len); + /* * If we've now freed all the blocks, reset the file sequence - * number to 0. + * number to 0 for pre-RTG file systems. */ - if (tp->t_frextents_delta + mp->m_sb.sb_frextents == + if (!xfs_has_rtgroups(mp) && + tp->t_frextents_delta + mp->m_sb.sb_frextents == mp->m_sb.sb_rextents) { if (!(rbmip->i_diflags & XFS_DIFLAG_NEWRTBM)) rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM; |
