xfs: random fixes for 6.6

Rollup of a couple of reviewed fixes.
 
 This has been lightly tested with fstests.  Enjoy!
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZScEigAKCRBKO3ySh0YR
 poyIAQDh9M10LGYfT6NCjxewOq0+JLPsvY51P159B05BJcunQQEAndXIcx0HUiCp
 3sbGvqiFhJf4mr/64iT3zZYi9V6shgo=
 =XUFz
 -----END PGP SIGNATURE-----

Merge tag 'random-fixes-6.6_2023-10-11' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-fixesD

xfs: random fixes for 6.6

Rollup of a couple of reviewed fixes.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>

* tag 'random-fixes-6.6_2023-10-11' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: process free extents to busy list in FIFO order
  xfs: adjust the incore perag block_count when shrinking
This commit is contained in:
Chandan Babu R 2023-10-12 10:07:54 +05:30
commit fa543e65ab
2 changed files with 8 additions and 1 deletions

View File

@ -1001,6 +1001,12 @@ xfs_ag_shrink_space(
error = -ENOSPC;
goto resv_init_out;
}
/* Update perag geometry */
pag->block_count -= delta;
__xfs_agino_range(pag->pag_mount, pag->block_count, &pag->agino_min,
&pag->agino_max);
xfs_ialloc_log_agi(*tpp, agibp, XFS_AGI_LENGTH);
xfs_alloc_log_agf(*tpp, agfbp, XFS_AGF_LENGTH);
return 0;

View File

@ -62,7 +62,8 @@ xfs_extent_busy_insert_list(
rb_link_node(&new->rb_node, parent, rbp);
rb_insert_color(&new->rb_node, &pag->pagb_tree);
list_add(&new->list, busy_list);
/* always process discard lists in fifo order */
list_add_tail(&new->list, busy_list);
spin_unlock(&pag->pagb_lock);
}