Skip to content

Commit 442177b

Browse files
author
Darrick J. Wong
committed
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 89cfa89. 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: 89cfa89 ("xfs: reduce AGF hold times during fstrim operations") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 6868b85 commit 442177b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/xfs_extent_busy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ xfs_extent_busy_insert_list(
6262
rb_link_node(&new->rb_node, parent, rbp);
6363
rb_insert_color(&new->rb_node, &pag->pagb_tree);
6464

65-
list_add(&new->list, busy_list);
65+
/* always process discard lists in fifo order */
66+
list_add_tail(&new->list, busy_list);
6667
spin_unlock(&pag->pagb_lock);
6768
}
6869

0 commit comments

Comments
 (0)