Skip to content

Commit

Permalink
Merge tag 'random-fixes-6.6_2023-10-11' of https://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/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 <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>

* 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
  • Loading branch information
Chandan Babu R committed Oct 12, 2023
2 parents 94f6f05 + 442177b commit fa543e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fs/xfs/libxfs/xfs_ag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion fs/xfs/xfs_extent_busy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fa543e6

Please sign in to comment.