summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_extent_busy.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-10-11 22:35:21 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-10-11 22:35:21 +0300
commit442177be8c3b8edfc29e14837e59771181c590b3 (patch)
tree7693454ae51e8efef553a98f831f550250683185 /fs/xfs/xfs_extent_busy.c
parent6868b8505c807ad9397d78cc4e07cb1cb3582152 (diff)
downloadlinux-442177be8c3b8edfc29e14837e59771181c590b3.tar.xz
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>
Diffstat (limited to 'fs/xfs/xfs_extent_busy.c')
-rw-r--r--fs/xfs/xfs_extent_busy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c
index 746814815b1d..9ecfdcdc752f 100644
--- a/fs/xfs/xfs_extent_busy.c
+++ b/fs/xfs/xfs_extent_busy.c
@@ -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);
}