]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: improve handling of busy extents in the low-level allocator
authorChristoph Hellwig <hch@lst.de>
Tue, 4 Apr 2017 20:37:44 +0000 (15:37 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 4 Apr 2017 20:37:44 +0000 (15:37 -0500)
commitcd80de0463e77b884190bdd8c6d76e26d75c7b2d
tree453d999537453cf19954cced089ae7f4baad6d33
parentc4b23661de8ea36677cd54eee170efd04f5b5d7d
xfs: improve handling of busy extents in the low-level allocator

Source kernel commit: ebf55872616c7d4754db5a318591a72a8d5e6896

Currently we force the log and simply try again if we hit a busy extent,
but especially with online discard enabled it might take a while after
the log force for the busy extents to disappear, and we might have
already completed our second pass.

So instead we add a new waitqueue and a generation counter to the pag
structure so that we can do wakeups once we've removed busy extents,
and we replace the single retry with an unconditional one - after
all we hold the AGF buffer lock, so no other allocations or frees
can be racing with us in this AG.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/libxfs_priv.h
libxfs/xfs_alloc.c