]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix metadata read-ahead during truncate
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 Dec 2017 20:11:39 +0000 (21:11 +0100)
committerBob Peterson <rpeterso@redhat.com>
Wed, 17 Jan 2018 13:35:50 +0000 (06:35 -0700)
commit4d492c7c6e74277909ff51ce428542473ed0e443
tree97db1b1f8a04435798d5c369ed2271d8921c7943
parentaf523553272c7662b953ae83f2e0e8fb45e62260
gfs2: Fix metadata read-ahead during truncate

The metadata read-ahead algorithm broke when switching from recursive to
non-recursive delete: the current algorithm reads ahead blocks at height
N - 1 while deallocating the blocks at hight N.  However, deallocating
the blocks at height N requires a complete walk of the metadata tree,
not only down to height N - 1.  Consequently, all blocks below height
N - 1 will be accessed without read-ahead.

Fix this by issuing read-aheads as early as possible, after each
metapath lookup.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/bmap.c