xfs: process free extents to busy list in FIFO order
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Oct 2023 19:35:21 +0000 (12:35 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 11 Oct 2023 19:35:21 +0000 (12:35 -0700)
commit442177be8c3b8edfc29e14837e59771181c590b3
tree7693454ae51e8efef553a98f831f550250683185
parent6868b8505c807ad9397d78cc4e07cb1cb3582152
xfs: process free extents to busy list in FIFO order

When we're adding extents to the busy discard list, add them to the tail
of the list so that we get FIFO order.  For FITRIM commands, this means
that we send discard bios sorted in order from longest to shortest, like
we did before commit 89cfa899608fc.

For transactions that are freeing extents, this puts them in the
transaction's busy list in FIFO order as well, which shouldn't make any
noticeable difference.

Fixes: 89cfa899608fc ("xfs: reduce AGF hold times during fstrim operations")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_extent_busy.c