]> git.baikalelectronics.ru Git - kernel.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)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 9 Nov 2018 10:55:33 +0000 (10:55 +0000)
commite747ae283ecbdae61aa325488f46102cf46c820e
tree5b082cfed3a0f01b2b5d0606fd47630715956482
parentf3e1c213b8d2c9ea12ac2d1395dda842daa7f738
gfs2: Fix metadata read-ahead during truncate (2)

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: 4d492c7c6e ("gfs2: Fix metadata read-ahead during truncate")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/bmap.c