]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: don't check for AG deadlock for realtime files in bunmapi
authorOmar Sandoval <osandov@fb.com>
Wed, 22 Jan 2020 16:29:46 +0000 (11:29 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 22 Jan 2020 16:29:46 +0000 (11:29 -0500)
commit0b89c0a733912937edb7565f19337b3bce2b4783
tree6b43f151c6ddbc9803ce4868528cc2d4fb0a43b4
parentf8446e51caf838e19d88819f0aefb6ec7f1b15bd
xfs: don't check for AG deadlock for realtime files in bunmapi

Source kernel commit: 69ffe5960df16938bccfe1b65382af0b3de51265

Commit 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") added
a check in __xfs_bunmapi() to stop early if we would touch multiple AGs
in the wrong order. However, this check isn't applicable for realtime
files. In most cases, it just makes us do unnecessary commits. However,
without the fix from the previous commit ("xfs: fix realtime file data
space leak"), if the last and second-to-last extents also happen to have
different "AG numbers", then the break actually causes __xfs_bunmapi()
to return without making any progress, which sends
xfs_itruncate_extents_flags() into an infinite loop.

Fixes: 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi")
Signed-off-by: Omar Sandoval <osandov@fb.com>
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/xfs_bmap.c