]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gfs2: Fix metadata read-ahead during truncate (2)
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 8 Nov 2018 20:14:29 +0000 (20:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:22:10 +0000 (09:22 +0100)
commit08f382aeba0c7f33a4db60608482192feb55ccaa
tree5b6355a19b8e9e097496852a3203d2e35c4d664d
parent47e7c3fc9b8bfc2c7048cb913e78f1935c519652
gfs2: Fix metadata read-ahead during truncate (2)

commit e7445ceddfc220c1aede6d42758a5acb8844e9c3 upstream.

The previous attempt to fix for metadata read-ahead during truncate was
incorrect: for files with a height > 2 (1006989312 bytes with a block
size of 4096 bytes), read-ahead requests were not being issued for some
of the indirect blocks discovered while walking the metadata tree,
leading to significant slow-downs when deleting large files.  Fix that.

In addition, only issue read-ahead requests in the first pass through
the meta-data tree, while deallocating data blocks.

Fixes: c3ce5aa9b0 ("gfs2: Fix metadata read-ahead during truncate")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/bmap.c